Add isOneOf to inspection query in ApolloSchemaDownloader#705
Add isOneOf to inspection query in ApolloSchemaDownloader#705glenngijsberts wants to merge 1 commit intoapollographql:v1from
Conversation
|
@glenngijsberts: 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/ |
👷 Deploy request for apollo-ios-docc pending review.Visit the deploys page to approve it
|
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 7 changed, 0 removedBuild ID: 08d1b63c67a14a0de34272a3 URL: https://www.apollographql.com/docs/deploy-preview/08d1b63c67a14a0de34272a3 |
|
Thanks for the PR @glenngijsberts - this seems correct but I'm not sure we can merge it yet since the @martinbonnin / @BoD - is this why |
|
Indeed, selecting To work around this, we implemented "2 step introspection":
|
calvincestari
left a comment
There was a problem hiding this comment.
@glenngijsberts - we can see from @BoD's reply that there needs to be more thought put into this change. We cannot break schema downloads for servers out there today so we'll need something like the 2-stage approach that Kotlin has in place.
|
@calvincestari @BoD makes sense 👍 I'm gonna have another look at this upcoming week, to see if it's possible to do something similar. How could I test this? I'm having a bit trouble understanding how everything works in the project, so any advice would be helpful! |
I don't think there are any specific tests required for this - as it is right now. This is because the response is fed into our graphql-js frontend which will validate everything and convert it into SDL. There might be additional tests required for the logic we've identified in the above comments. |
|
I've moved the base branch for this to Also changing the status to Draft until the path forward is clearer. |
In #537 the
@oneOfdirective was introduced. However, I noticed that the directive was not included in my schema when I did an introspection, and so the additional types were not generated.I had a look at the source code, and noticed that the
isOneOfwas missing from the inspection query done inApolloSchemaDownloader. I've added it, but I wasn't really able to test this, so I was hoping if somebody can point me in the right direction or help me out with this 🙏