Add specifiedBy directive
This commit is contained in:
		| @@ -85,6 +85,7 @@ schemaWithTypes description' queryRoot mutationRoot subscriptionRoot types' dire | ||||
|         [ ("skip", skipDirective) | ||||
|         , ("include", includeDirective) | ||||
|         , ("deprecated", deprecatedDirective) | ||||
|         , ("specifiedBy", specifiedByDirective) | ||||
|         ] | ||||
|     includeDirective = | ||||
|         Directive includeDescription skipIncludeLocations includeArguments | ||||
| @@ -113,9 +114,8 @@ schemaWithTypes description' queryRoot mutationRoot subscriptionRoot types' dire | ||||
|         \the Markdown syntax, as specified by \ | ||||
|         \[CommonMark](https://commonmark.org/).'" | ||||
|     deprecatedArguments = HashMap.singleton "reason" | ||||
|         $ In.Argument reasonDescription reasonType | ||||
|         $ In.Argument reasonDescription (In.NamedScalarType Definition.string) | ||||
|         $ Just "No longer supported" | ||||
|     reasonType = In.NamedScalarType Definition.string | ||||
|     deprecatedDescription = Just | ||||
|         "Marks an element of a GraphQL schema as no longer supported." | ||||
|     deprecatedLocations = | ||||
| @@ -124,6 +124,16 @@ schemaWithTypes description' queryRoot mutationRoot subscriptionRoot types' dire | ||||
|         , TypeSystemDirectiveLocation DirectiveLocation.InputFieldDefinition | ||||
|         , 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. | ||||
| collectReferencedTypes :: forall m | ||||
|   | ||||
		Reference in New Issue
	
	Block a user