Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nullability is handled differently based on source for OpenApi swaggers #6556

Closed
4 tasks
nathanbrachotte opened this issue Feb 9, 2024 · 2 comments
Closed
4 tasks

Comments

@nathanbrachotte
Copy link

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

Make sure to fork this template and run yarn generate in the terminal.

Please make sure Mesh package versions under package.json matches yours.

  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

The output for the exact same openApi Swagger definition (in yml) differs whether it is fetched from an endpoint or read locally by graphql-mesh.
Basically afaics, this issue #2627 still occurs when fetching the swagger

To Reproduce Steps to reproduce the behavior:

I cannot provide a reproduction as our endpoints aren't public, and you need both a hosted and local version of the same file.
Sorry about that :/ Feel free to suggest a way I can help with that.

Expected behavior

Outputted schema to handle nullable: true correctly when schema is fetched from a URL

type User {
  id: String!
  name: String!
  imageUrl: String
}

But the result we get atm is:

type User {
  id: String!
  name: String!
  imageUrl: String!
}

Environment:

  • OS: MacOS 14.1.1 (23B81)
  • "@graphql-mesh/openapi": "^0.98.0":
  • NodeJS:

Additional context

I tried to curl the schema manually, then add the file locally and generate. I then got the expected result.

@ardatan
Copy link
Owner

ardatan commented Feb 9, 2024

Thanks for creating the issue but if you help us to reproduce it, we can help you better.

@nathanbrachotte
Copy link
Author

Hey there, turns out the issue is somewhere else. Still investigating.
Closing the issue for now and I'll open a new one if I manage to identify where the issue is coming from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants