Add specifiedBy directive
This commit is contained in:
parent
6e32112be4
commit
a4e648d5aa
@ -85,6 +85,7 @@ schemaWithTypes description' queryRoot mutationRoot subscriptionRoot types' dire
|
|||||||
[ ("skip", skipDirective)
|
[ ("skip", skipDirective)
|
||||||
, ("include", includeDirective)
|
, ("include", includeDirective)
|
||||||
, ("deprecated", deprecatedDirective)
|
, ("deprecated", deprecatedDirective)
|
||||||
|
, ("specifiedBy", specifiedByDirective)
|
||||||
]
|
]
|
||||||
includeDirective =
|
includeDirective =
|
||||||
Directive includeDescription skipIncludeLocations includeArguments
|
Directive includeDescription skipIncludeLocations includeArguments
|
||||||
@ -113,9 +114,8 @@ schemaWithTypes description' queryRoot mutationRoot subscriptionRoot types' dire
|
|||||||
\the Markdown syntax, as specified by \
|
\the Markdown syntax, as specified by \
|
||||||
\[CommonMark](https://commonmark.org/).'"
|
\[CommonMark](https://commonmark.org/).'"
|
||||||
deprecatedArguments = HashMap.singleton "reason"
|
deprecatedArguments = HashMap.singleton "reason"
|
||||||
$ In.Argument reasonDescription reasonType
|
$ In.Argument reasonDescription (In.NamedScalarType Definition.string)
|
||||||
$ Just "No longer supported"
|
$ Just "No longer supported"
|
||||||
reasonType = In.NamedScalarType Definition.string
|
|
||||||
deprecatedDescription = Just
|
deprecatedDescription = Just
|
||||||
"Marks an element of a GraphQL schema as no longer supported."
|
"Marks an element of a GraphQL schema as no longer supported."
|
||||||
deprecatedLocations =
|
deprecatedLocations =
|
||||||
@ -124,6 +124,16 @@ schemaWithTypes description' queryRoot mutationRoot subscriptionRoot types' dire
|
|||||||
, TypeSystemDirectiveLocation DirectiveLocation.InputFieldDefinition
|
, TypeSystemDirectiveLocation DirectiveLocation.InputFieldDefinition
|
||||||
, TypeSystemDirectiveLocation DirectiveLocation.EnumValue
|
, TypeSystemDirectiveLocation DirectiveLocation.EnumValue
|
||||||
]
|
]
|
||||||
|
specifiedByDirective =
|
||||||
|
Directive specifiedByDescription specifiedByLocations specifiedByArguments
|
||||||
|
urlDescription = Just
|
||||||
|
"The URL that specifies the behavior of this scalar."
|
||||||
|
specifiedByArguments = HashMap.singleton "url"
|
||||||
|
$ In.Argument urlDescription (In.NonNullScalarType Definition.string) Nothing
|
||||||
|
specifiedByDescription = Just
|
||||||
|
"Exposes a URL that specifies the behavior of this scalar."
|
||||||
|
specifiedByLocations =
|
||||||
|
[TypeSystemDirectiveLocation DirectiveLocation.Scalar]
|
||||||
|
|
||||||
-- | Traverses the schema and finds all referenced types.
|
-- | Traverses the schema and finds all referenced types.
|
||||||
collectReferencedTypes :: forall m
|
collectReferencedTypes :: forall m
|
||||||
|
Loading…
Reference in New Issue
Block a user