|
| 1 | +"This allows you to hydrate new values into fields" |
| 2 | +directive @defaultHydration( |
| 3 | + "The batch size" |
| 4 | + batchSize: Int! = 200, |
| 5 | + "The backing level field for the data" |
| 6 | + field: String!, |
| 7 | + "Name of the ID argument on the backing field" |
| 8 | + idArgument: String!, |
| 9 | + "How to identify matching results" |
| 10 | + identifiedBy: String! = "id", |
| 11 | + "The timeout to use when completing hydration" |
| 12 | + timeout: Int! = -1 |
| 13 | + ) on OBJECT | INTERFACE |
| 14 | + |
| 15 | +directive @defer(if: Boolean, label: String) on FRAGMENT_SPREAD | INLINE_FRAGMENT |
| 16 | + |
| 17 | +"Marks the field, argument, input field or enum value as deprecated" |
| 18 | +directive @deprecated( |
| 19 | + "The reason for the deprecation" |
| 20 | + reason: String! = "No longer supported" |
| 21 | + ) on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION |
| 22 | + |
| 23 | +"This directive disables error propagation when a non nullable field returns null for the given operation." |
| 24 | +directive @experimental_disableErrorPropagation on QUERY | MUTATION | SUBSCRIPTION |
| 25 | + |
| 26 | +"Indicates that the field is not available for queries or introspection" |
| 27 | +directive @hidden on FIELD_DEFINITION |
| 28 | + |
| 29 | +"This allows you to hydrate new values into fields" |
| 30 | +directive @hydrated( |
| 31 | + "The arguments to the hydrated field" |
| 32 | + arguments: [NadelHydrationArgument!]!, |
| 33 | + "The batch size" |
| 34 | + batchSize: Int! = 200, |
| 35 | + "The target top level field" |
| 36 | + field: String!, |
| 37 | + "How to identify matching results" |
| 38 | + identifiedBy: String! = "id", |
| 39 | + "Are results indexed" |
| 40 | + indexed: Boolean! = false, |
| 41 | + "How to identify matching results" |
| 42 | + inputIdentifiedBy: [NadelBatchObjectIdentifiedBy!]! = [], |
| 43 | + "The target service" |
| 44 | + service: String, |
| 45 | + "The timeout to use when completing hydration" |
| 46 | + timeout: Int! = -1, |
| 47 | + "Specify a condition for the hydration to activate" |
| 48 | + when: NadelHydrationCondition |
| 49 | + ) repeatable on FIELD_DEFINITION |
| 50 | + |
| 51 | +directive @hydrationRemainingArguments on ARGUMENT_DEFINITION |
| 52 | + |
| 53 | +"This allows you to hydrate new values into fields" |
| 54 | +directive @idHydrated( |
| 55 | + "The field that holds the ID value(s) to hydrate" |
| 56 | + idField: String!, |
| 57 | + "(Optional override) how to identify matching results" |
| 58 | + identifiedBy: String = null |
| 59 | + ) on FIELD_DEFINITION |
| 60 | + |
| 61 | +"Directs the executor to include this field or fragment only when the `if` argument is true" |
| 62 | +directive @include( |
| 63 | + "Included when true." |
| 64 | + if: Boolean! |
| 65 | + ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT |
| 66 | + |
| 67 | +"Indicates that the field is a namespaced field." |
| 68 | +directive @namespaced on FIELD_DEFINITION |
| 69 | + |
| 70 | +"Indicates an Input Object is a OneOf Input Object." |
| 71 | +directive @oneOf on INPUT_OBJECT |
| 72 | + |
| 73 | +"This allows you to partition a field" |
| 74 | +directive @partition( |
| 75 | + "The path to the split point" |
| 76 | + pathToPartitionArg: [String!]! |
| 77 | + ) on FIELD_DEFINITION |
| 78 | + |
| 79 | +"This allows you to rename a type or field in the overall schema" |
| 80 | +directive @renamed( |
| 81 | + "The type to be renamed" |
| 82 | + from: String! |
| 83 | + ) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | UNION | ENUM | INPUT_OBJECT |
| 84 | + |
| 85 | +"Directs the executor to skip this field or fragment when the `if` argument is true." |
| 86 | +directive @skip( |
| 87 | + "Skipped when true." |
| 88 | + if: Boolean! |
| 89 | + ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT |
| 90 | + |
| 91 | +"Exposes a URL that specifies the behaviour of this scalar." |
| 92 | +directive @specifiedBy( |
| 93 | + "The URL that specifies the behaviour of this scalar." |
| 94 | + url: String! |
| 95 | + ) on SCALAR |
| 96 | + |
| 97 | +""" |
| 98 | +Allows you to introduce stubbed fields or types. |
| 99 | +
|
| 100 | +Stubbed fields or fields that return stubbed types _always_ return null. |
| 101 | +
|
| 102 | +Stubbed fields are meant to allow frontend clients consume new schema elements earlier so that they can iterate faster. |
| 103 | +""" |
| 104 | +directive @stubbed on OBJECT | FIELD_DEFINITION | UNION | ENUM | INPUT_OBJECT |
| 105 | + |
| 106 | +directive @virtualType on OBJECT |
| 107 | + |
| 108 | +type Query { |
| 109 | + echo: String |
| 110 | +} |
| 111 | + |
| 112 | +"A JSON scalar" |
| 113 | +scalar JSON |
| 114 | + |
| 115 | +"This is required by batch hydration to understand how to pull out objects from the batched result" |
| 116 | +input NadelBatchObjectIdentifiedBy { |
| 117 | + resultId: String! |
| 118 | + sourceId: String! |
| 119 | +} |
| 120 | + |
| 121 | +"This allows you to hydrate new values into fields" |
| 122 | +input NadelHydrationArgument { |
| 123 | + name: String! |
| 124 | + value: JSON! |
| 125 | +} |
| 126 | + |
| 127 | +"Specify a condition for the hydration to activate" |
| 128 | +input NadelHydrationCondition { |
| 129 | + result: NadelHydrationResultCondition! |
| 130 | +} |
| 131 | + |
| 132 | +"Specify a condition for the hydration to activate based on the result" |
| 133 | +input NadelHydrationResultCondition { |
| 134 | + predicate: NadelHydrationResultFieldPredicate! |
| 135 | + sourceField: String! |
| 136 | +} |
| 137 | + |
| 138 | +input NadelHydrationResultFieldPredicate @oneOf { |
| 139 | + equals: JSON |
| 140 | + matches: String |
| 141 | + startsWith: String |
| 142 | +} |
0 commit comments