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
This in an implementation for a spec proposal:
* Spec proposal: [[RFC] Custom Scalar Specification URIs](graphql/graphql-spec#649)
* Original issue: [[RFC] Custom Scalar Specification URIs](graphql/graphql-spec#635)
@@ -184,7 +185,7 @@ export const __DirectiveLocation = new GraphQLEnumType({
184
185
exportconst__Type=newGraphQLObjectType({
185
186
name: '__Type',
186
187
description:
187
-
'The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a nameand description, 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.',
188
+
'The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional specifiedBy URL, 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.',
188
189
fields: ()=>
189
190
({
190
191
kind: {
@@ -221,6 +222,20 @@ export const __Type = new GraphQLObjectType({
Copy file name to clipboardExpand all lines: src/utilities/__tests__/schemaPrinter-test.js
+16-2
Original file line number
Diff line number
Diff line change
@@ -590,6 +590,12 @@ describe('Type System Printer', () => {
590
590
if: Boolean!
591
591
) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
592
592
593
+
"""Exposes a URL that specifies the behaviour of this scalar."""
594
+
directive @specified(
595
+
"""The URL that specifies the behaviour of this scalar."""
596
+
by: String!
597
+
) on SCALAR
598
+
593
599
"""Marks an element of a GraphQL schema as no longer supported."""
594
600
directive @deprecated(
595
601
"""
@@ -735,12 +741,13 @@ describe('Type System Printer', () => {
735
741
"""
736
742
The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the \`__TypeKind\` enum.
737
743
738
-
Depending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a nameand description, 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.
744
+
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 specifiedBy URL, 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.
@@ -803,6 +810,12 @@ describe('Type System Printer', () => {
803
810
if: Boolean!
804
811
) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
805
812
813
+
# Exposes a URL that specifies the behaviour of this scalar.
814
+
directive @specified(
815
+
# The URL that specifies the behaviour of this scalar.
816
+
by: String!
817
+
) on SCALAR
818
+
806
819
# Marks an element of a GraphQL schema as no longer supported.
807
820
directive @deprecated(
808
821
# 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/).
@@ -927,11 +940,12 @@ describe('Type System Printer', () => {
927
940
928
941
# The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the \`__TypeKind\` enum.
929
942
#
930
-
# Depending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a nameand description, 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.
943
+
# 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 specifiedBy URL, 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.
0 commit comments