-
Notifications
You must be signed in to change notification settings - Fork 357
Closed
Labels
Description
👋,
I think it's because of a typo here "mutations" instead of "mutation":
https://github.com/DataDog/dd-trace-js/blob/master/src/plugins/graphql.js#L257
While debugging this I also discovered that this does not work as intended:
https://github.com/DataDog/dd-trace-js/blob/master/src/plugins/graphql.js#L15-L17
This might use the patched schema, because the object is never deeply copied.
I could reproduce this like so:
- start graphql server
- run mutation, works fine (does not wrap anything since there's a typo)
- run query, schema is mutated
- run mutation, throw errors: contextValue in undefined in #resolveField