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

createSchemaCustomization is failing to find tracer in 2.21.31 vs 2.21.19 #24100

Closed
zslabs opened this issue May 14, 2020 · 3 comments · Fixed by #24108
Closed

createSchemaCustomization is failing to find tracer in 2.21.31 vs 2.21.19 #24100

zslabs opened this issue May 14, 2020 · 3 comments · Fixed by #24108
Assignees
Labels
status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. status: needs core review Currently awaiting review from Core team member topic: GraphQL Related to Gatsby's GraphQL layer type: bug An issue or pull request relating to a bug in Gatsby

Comments

@zslabs
Copy link
Contributor

zslabs commented May 14, 2020

Description

createSchemaCustomization is not working as intended in 2.21.31 vs 2.21.19

Is #23589 potentially related?

Steps to reproduce

  1. https://github.com/duanecilliers/gatsby-mdx-frontmatter-starter uses the same setup as mine, but happy to pair over Zoom
  2. Use Gatsby 2.21.19 to start develop server
  3. Should work fine
  4. Upgrade to 2.21.31
  5. Errors out in console with Cannot read property 'tracer' of undefined on fields that use custom schema resolver.

Expected result

Schema customizations should work as they do in previous versions.

If there is updated documentation I may have missed, please let me know.

Screen Shot 2020-05-14 at 6 42 14 PM

@zslabs zslabs added the type: bug An issue or pull request relating to a bug in Gatsby label May 14, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 14, 2020
@pieh pieh added status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. status: needs core review Currently awaiting review from Core team member topic: GraphQL Related to Gatsby's GraphQL layer and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels May 15, 2020
@pieh
Copy link
Contributor

pieh commented May 15, 2020

It seems very likely that PR you linked is responsible.

Last working version I found is 2.21.22, and next one (2.21.23) breaks with error you describe (that was also release that introduced changes from that PR)

@freiksenet
Copy link
Contributor

freiksenet commented May 15, 2020

Thank you for you report! This is fixed in 2.21.32. Resolver now checks if context is passed at all before using tracer.

I recommend always passing context and info to resolvers - they are compulsory parameters and they would break without them in a similarly confusing manner. I've added warning now so that it's easier to detect what's wrong.

@zslabs
Copy link
Contributor Author

zslabs commented May 15, 2020

Thank you very much @freiksenet!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. status: needs core review Currently awaiting review from Core team member topic: GraphQL Related to Gatsby's GraphQL layer type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants