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

Factor out runQuery's use of logFunction into an extension #1128

Merged
merged 1 commit into from
Jun 2, 2018

Conversation

glasser
Copy link
Member

@glasser glasser commented Jun 2, 2018

This requires a slightly newer graphql-extensions beta which has more arguments
to requestDidStart.

Also make it ok to not pass logFunction to formatApolloErrors.

@glasser glasser requested a review from evans June 2, 2018 01:03
@glasser glasser force-pushed the glasser/logfunction-extension branch 3 times, most recently from d5d2dda to 8dde9ca Compare June 2, 2018 04:05
This requires a slightly newer graphql-extensions beta which has more arguments
to requestDidStart.

Also make it ok to not pass logFunction to formatApolloErrors, and make sure
custom fieldResolvers continue to work with extensions (by upgrading the
dependency and fixing a logic bug).

The custom fieldResolvers fix means that we now unconditionally put the
extension stack on the GraphQL context, which means that the context can no
longer be (say) a string.  I changed a test that expected string contexts to
work. You couldn't use a string for a context when using extensions before, so
this isn't that big of a change.
@glasser glasser force-pushed the glasser/logfunction-extension branch from 8dde9ca to 95e01f2 Compare June 2, 2018 04:08
@glasser glasser merged commit 5c65742 into version-2 Jun 2, 2018
@glasser glasser deleted the glasser/logfunction-extension branch June 2, 2018 04:16
@evans evans mentioned this pull request Jun 4, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant