Skip to content

Commit e4cc885

Browse files
committed
docs: describe the directives in graphql schema
1 parent 6525acb commit e4cc885

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

schema/gitlab.schema.graphqls

+15
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
1+
# @generated fields are constructed in Go, and do not come from the GraphQL endpoint.
12
directive @generated on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
3+
4+
# @internal is not exposed in expr scope, and is only available within Go code
5+
# this is often used when needing to grab data from GraphQL, but not wanting to expose
6+
# it directly (e.g. due to nesting)
27
directive @internal on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
8+
9+
# @expr changes the name of the field when its exposed to expr scope.
10+
# When omitted (and @internal is not used) we automatically convert the field
11+
# from "CamelCaseName" to "snake_case_name" in code generation step
312
directive @expr(key: String!) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
13+
14+
# @graph changes the name (and query) of the field when sending it to the GraphQL server.
15+
# This case be used to impose limits in "connections" or providing filtering keys.
416
directive @graphql(key: String!) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
517

18+
# Add time.Time support
619
scalar Time
20+
21+
# Add time.Duration support
722
scalar Duration
823

924
type Context {

0 commit comments

Comments
 (0)