Skip to content

Commit 692d811

Browse files
committed
Define the directive
1 parent f4fab96 commit 692d811

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

spec/Section 3 -- Type System.md

+24
Original file line numberDiff line numberDiff line change
@@ -2167,3 +2167,27 @@ to the relevant IETF specification.
21672167
```graphql example
21682168
scalar UUID @specifiedBy(url: "https://tools.ietf.org/html/rfc4122")
21692169
```
2170+
2171+
### @behavior
2172+
2173+
```graphql
2174+
directive @behavior(onError: __ErrorBehavior! = PROPAGATE) on SCHEMA
2175+
```
2176+
2177+
The `@behavior` _built-in directive_ is used within the type system definition
2178+
language to indicate the _default error behavior_ of a GraphQL schema. It may be
2179+
omitted only if the _default error behavior_ is {"PROPAGATE"}.
2180+
2181+
Note: See [Handling Execution Errors](#sec-Handling-Execution-Errors) for more
2182+
information on _error behavior_.
2183+
2184+
<!-- https://github.com/prettier/prettier/issues/17286 -->
2185+
<!-- prettier-ignore -->
2186+
In this example, the schema indicates it is using the {"NO\_PROPAGATE"} _default
2187+
error behavior_:
2188+
2189+
```graphql example
2190+
schema @behavior(onError: NO_PROPAGATE) {
2191+
query: Query
2192+
}
2193+
```

0 commit comments

Comments
 (0)