diff options
Diffstat (limited to 'app/graphql/cached_introspection_query.rb')
-rw-r--r-- | app/graphql/cached_introspection_query.rb | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/app/graphql/cached_introspection_query.rb b/app/graphql/cached_introspection_query.rb new file mode 100644 index 00000000000..f2b98426714 --- /dev/null +++ b/app/graphql/cached_introspection_query.rb @@ -0,0 +1,107 @@ +# frozen_string_literal: true + +module CachedIntrospectionQuery + def self.query_string + <<~QUERY.squish + query IntrospectionQuery { + __schema { + queryType { + name + } + mutationType { + name + } + subscriptionType { + name + } + types { + ...FullType + } + directives { + name + description + locations + args { + ...InputValue + } + } + } + } + + fragment FullType on __Type { + kind + name + description + fields(includeDeprecated: true) { + name + description + args { + ...InputValue + } + type { + ...TypeRef + } + isDeprecated + deprecationReason + } + inputFields { + ...InputValue + } + interfaces { + ...TypeRef + } + enumValues(includeDeprecated: true) { + name + description + isDeprecated + deprecationReason + } + possibleTypes { + ...TypeRef + } + } + + fragment InputValue on __InputValue { + name + description + type { + ...TypeRef + } + defaultValue + } + + 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 + } + } + } + } + } + } + } + } + QUERY + end +end |