Skip to content

WPGraphQL Logging Plugin: Exclude Introspection Queries #401

@colinmurphy

Description

@colinmurphy

Overview

When using a headless framework such as Faust.js we are getting additional logs for introspection queries

e.g.

query IntrospectionQuery { __schema { queryType { name kind __typename } mutationType { name kind __typename } subscriptionType { name kind __typename } types { ...FullType __typename } directives { name description locations args { ...InputValue __typename } __typename } __typename } } fragment FullType on __Type { kind name description fields(includeDeprecated: true) { name description args { ...InputValue __typename } type { ...TypeRef __typename } isDeprecated deprecationReason __typename } inputFields { ...InputValue __typename } interfaces { ...TypeRef __typename } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason __typename } possibleTypes { ...TypeRef __typename } __typename } fragment InputValue on __InputValue { name description type { ...TypeRef __typename } defaultValue __typename } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name __typename } __typename } __typename } __typename } __typename } __typename } __typename } __typename } __typename } __typename }
--

These should be excluded by default and we can add a filter to allow users on whether they want these queries logged.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    ✅ Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions