@StaticDataSource

Definition
directive @StaticDataSource (
data: String
) on FIELD_DEFINITION

The @StaticDataSource lets you embed a static response into the schema.

Example usage
type Query {
hello: String!
@StaticDataSource(
data: "World!"
)
staticBoolean: Boolean!
@StaticDataSource(
data: "true"
)
nonNullInt: Int!
@StaticDataSource(
data: "1"
)
nullableInt: Int
@StaticDataSource(
data: null
)
foo: Foo!
@StaticDataSource(
data: "{\"bar\": \"baz\"}"
)
}
Example Query
{
hello
}
Example Response
{"hello": "World"}