Skip to content

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

Merged
glasser merged 1 commit into
version-2from
glasser/logfunction-extension
Jun 2, 2018
Merged

Factor out runQuery's use of logFunction into an extension#1128
glasser merged 1 commit into
version-2from
glasser/logfunction-extension

Conversation

@glasser

@glasser glasser commented Jun 2, 2018

Copy link
Copy Markdown
Member

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