-
Notifications
You must be signed in to change notification settings - Fork 257
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
fix(subgraph): Conditionally print @specifiedBy directive on scalars correctly #1463
Conversation
@angelo-moreira: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Thanks @angelo-moreira, this LGTM.
Would you please add a CHANGELOG entry for this in I'll get this cherry-picked / backported to the |
Thank you for the quick reply @trevor-scheer, I have now added a line to the changelog with hopefully a useful commit, please do let me know if you need me to do something else, it's my first time contributing to this project. |
A great first contribution @angelo-moreira! I made a few minor tweaks to save you the trouble, but otherwise this is excellent. Thanks again! |
When having a schema with scalars
We end up in a situation where the scalar is
undefined
instead ofnull
.Because of that when we try to get the
sdl
we receive the@specifiedBy
tag with an object attached to it.This PR should fix that by weakly comparing
undefined == null
, I am happy to do a more strict comparison.