You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought ignoring introspection queries made sense and I thought it made sense as an option with default set to false. Anyway I realised you have a ignoredOps flag but it is being ignored on account of the operationName property being in a different place.
will produce the expected behaviour. Perhaps this was a change added in Apollo 3?
The text was updated successfully, but these errors were encountered:
edzillion
changed the title
ignoredOps is not working, allowing introspectionQuerys to
ignoredOps is not working, allowing introspectionQuerys to be logged
Jan 17, 2022
I thought ignoring introspection queries made sense and I thought it made sense as an option with default set to false. Anyway I realised you have a
ignoredOps
flag but it is being ignored on account of theoperationName
property being in a different place.How Do We Reproduce?
At least on my system, an out of the box install with
apollo-server-express
andapollo-logs
will start logging introspectionQuerys.Expected Behavior
introspectionQuerys are ignored by default
Actual Behavior
log fills up with introspectionQuerys
Observations
Changing this line:
https://github.com/edzillion/apollo-log/blob/0b33bcd29f17ca8d321586b4770fe1c779ff96cb/src/index.ts#L66
To:
And this line:
https://github.com/edzillion/apollo-log/blob/0b33bcd29f17ca8d321586b4770fe1c779ff96cb/src/index.ts#L73
To:
operationName: operationName,
and also add a flag to the response handler to ignore introspectionQuery reponses too:
https://github.com/edzillion/apollo-log/blob/0b33bcd29f17ca8d321586b4770fe1c779ff96cb/src/index.ts#L110
options.events.willSendResponse && !ignore && log(operationId, { event: 'response', metrics, context });
will produce the expected behaviour. Perhaps this was a change added in Apollo 3?
The text was updated successfully, but these errors were encountered: