-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Don't parse the GraphQL schema twice on load #3069
Conversation
🦋 Changeset is good to goLatest commit: bcd1926 We got this. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Yeah, this is a slightly awkward corner of the keystone object API. This PR should really be a I think we could easily have
and have it do something meaningful. If we wanted to go with a backwards incompatible change then I'd propose the same behaviour but just change the methods args to be an object, e.g. Thoughts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timleslie This looks good to me. What do you think?
(EDIT: Async error, left review tab open while Tim was commenting)
Idea I had last night want to make Right now, the only place |
I think I'd be in favour of your suggestion of making I don't think there's any value in adding a CLI option, it just feels like API cruft to me. |
@timleslie ok, done |
BTW, does this really need to be a major patch? getTypeDefs is an internal function and dumpSchema is basically undocumented. I don't think it make sense to do a major version bump any time any API changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Apollo already accepts the AST output of
gql
. No need to parse the schema both in ks and then again in Apollo.Honestly, I might make
dumpSchema
just return a string so we can avoid that boilerplate in the tests. 😐