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

Runtime schema differs from generated schema in production #4799

Closed
1 of 4 tasks
Zn4rK opened this issue Nov 9, 2022 · 0 comments · Fixed by #4767
Closed
1 of 4 tasks

Runtime schema differs from generated schema in production #4799

Zn4rK opened this issue Nov 9, 2022 · 0 comments · Fixed by #4767

Comments

@Zn4rK
Copy link

Zn4rK commented Nov 9, 2022

Issue workflow progress

Progress of the issue based on the Contributor Workflow

  • 1. The issue provides a reproduction available on CodeSandbox.
  • 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 expected runtime schema works in mesh dev but not mesh build && mesh start. It seems like the type name is inferred from the field name rather than from the name in the schema.

The generated SDL and TypeScript files are correct and looks like what I would expect. Running mesh dev also yields the correct runtime schema.

The issue only occurs whenever mesh uses the generated jsonSchemaBundle. I don't know if the problem originates here though.

To Reproduce
Steps to reproduce the behavior: repro.

Run "yarn start" and in Playground look at the introspected schema:
Screenshot 2022-11-09 at 14 02 49

Now run yarn prod and again look at the introspected schema:
Screenshot 2022-11-09 at 14 02 34

Expected behavior

I expect it to behave like it does in mesh dev.

Environment:

  • OS: MacOS Montery 12.6
  • @graphql-mesh:
    "@graphql-mesh/cli": "0.79.3",
    "@graphql-mesh/openapi": "0.33.34",
    "@graphql-mesh/runtime": "0.44.31",
  • NodeJS: v16.15.1

Additional context

The Thing type is duplicated and exists twice in the schema.
It does remind me of this issue I filed in openapi-to-graphql.

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

Successfully merging a pull request may close this issue.

1 participant