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
Copy file name to clipboardExpand all lines: src/utilities/__tests__/printSchema-test.js
-197Lines changed: 0 additions & 197 deletions
Original file line number
Diff line number
Diff line change
@@ -832,201 +832,4 @@ describe('Type System Printer', () => {
832
832
}
833
833
`);
834
834
});
835
-
836
-
it('Print Introspection Schema with comment descriptions',()=>{
837
-
constschema=newGraphQLSchema({});
838
-
constoutput=printIntrospectionSchema(schema,{
839
-
commentDescriptions: true,
840
-
});
841
-
842
-
expect(output).to.equal(dedent`
843
-
# Directs the executor to include this field or fragment only when the \`if\` argument is true.
844
-
directive @include(
845
-
# Included when true.
846
-
if: Boolean!
847
-
) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
848
-
849
-
# Directs the executor to skip this field or fragment when the \`if\` argument is true.
850
-
directive @skip(
851
-
# Skipped when true.
852
-
if: Boolean!
853
-
) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
854
-
855
-
# Marks an element of a GraphQL schema as no longer supported.
856
-
directive @deprecated(
857
-
# Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).
858
-
reason: String = "No longer supported"
859
-
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ENUM_VALUE
860
-
861
-
# Exposes a URL that specifies the behaviour of this scalar.
862
-
directive @specifiedBy(
863
-
# The URL that specifies the behaviour of this scalar.
864
-
url: String!
865
-
) on SCALAR
866
-
867
-
# A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.
868
-
type __Schema {
869
-
description: String
870
-
871
-
# A list of all types supported by this server.
872
-
types: [__Type!]!
873
-
874
-
# The type that query operations will be rooted at.
875
-
queryType: __Type!
876
-
877
-
# If this server supports mutation, the type that mutation operations will be rooted at.
878
-
mutationType: __Type
879
-
880
-
# If this server support subscription, the type that subscription operations will be rooted at.
881
-
subscriptionType: __Type
882
-
883
-
# A list of all directives supported by this server.
884
-
directives: [__Directive!]!
885
-
}
886
-
887
-
# The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the \`__TypeKind\` enum.
888
-
#
889
-
# Depending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional \`specifiedByUrl\`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.
# Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.
941
-
type __InputValue {
942
-
name: String!
943
-
description: String
944
-
type: __Type!
945
-
946
-
# A GraphQL-formatted string representing the default value for this input value.
947
-
defaultValue: String
948
-
isDeprecated: Boolean!
949
-
deprecationReason: String
950
-
}
951
-
952
-
# One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.
953
-
type __EnumValue {
954
-
name: String!
955
-
description: String
956
-
isDeprecated: Boolean!
957
-
deprecationReason: String
958
-
}
959
-
960
-
# A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
961
-
#
962
-
# In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.
963
-
type __Directive {
964
-
name: String!
965
-
description: String
966
-
isRepeatable: Boolean!
967
-
locations: [__DirectiveLocation!]!
968
-
args: [__InputValue!]!
969
-
}
970
-
971
-
# A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.
972
-
enum __DirectiveLocation {
973
-
# Location adjacent to a query operation.
974
-
QUERY
975
-
976
-
# Location adjacent to a mutation operation.
977
-
MUTATION
978
-
979
-
# Location adjacent to a subscription operation.
980
-
SUBSCRIPTION
981
-
982
-
# Location adjacent to a field.
983
-
FIELD
984
-
985
-
# Location adjacent to a fragment definition.
986
-
FRAGMENT_DEFINITION
987
-
988
-
# Location adjacent to a fragment spread.
989
-
FRAGMENT_SPREAD
990
-
991
-
# Location adjacent to an inline fragment.
992
-
INLINE_FRAGMENT
993
-
994
-
# Location adjacent to a variable definition.
995
-
VARIABLE_DEFINITION
996
-
997
-
# Location adjacent to a schema definition.
998
-
SCHEMA
999
-
1000
-
# Location adjacent to a scalar definition.
1001
-
SCALAR
1002
-
1003
-
# Location adjacent to an object type definition.
1004
-
OBJECT
1005
-
1006
-
# Location adjacent to a field definition.
1007
-
FIELD_DEFINITION
1008
-
1009
-
# Location adjacent to an argument definition.
1010
-
ARGUMENT_DEFINITION
1011
-
1012
-
# Location adjacent to an interface definition.
1013
-
INTERFACE
1014
-
1015
-
# Location adjacent to a union definition.
1016
-
UNION
1017
-
1018
-
# Location adjacent to an enum definition.
1019
-
ENUM
1020
-
1021
-
# Location adjacent to an enum value definition.
1022
-
ENUM_VALUE
1023
-
1024
-
# Location adjacent to an input object type definition.
1025
-
INPUT_OBJECT
1026
-
1027
-
# Location adjacent to an input object field definition.
0 commit comments