Skip to content

Commit

Permalink
docs: describe the directives in graphql schema
Browse files Browse the repository at this point in the history
  • Loading branch information
jippi committed May 6, 2024
1 parent 6525acb commit e4cc885
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions schema/gitlab.schema.graphqls
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
# @generated fields are constructed in Go, and do not come from the GraphQL endpoint.
directive @generated on INPUT_FIELD_DEFINITION | FIELD_DEFINITION

# @internal is not exposed in expr scope, and is only available within Go code
# this is often used when needing to grab data from GraphQL, but not wanting to expose
# it directly (e.g. due to nesting)
directive @internal on INPUT_FIELD_DEFINITION | FIELD_DEFINITION

# @expr changes the name of the field when its exposed to expr scope.
# When omitted (and @internal is not used) we automatically convert the field
# from "CamelCaseName" to "snake_case_name" in code generation step
directive @expr(key: String!) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION

# @graph changes the name (and query) of the field when sending it to the GraphQL server.
# This case be used to impose limits in "connections" or providing filtering keys.
directive @graphql(key: String!) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION

# Add time.Time support
scalar Time

# Add time.Duration support
scalar Duration

type Context {
Expand Down

0 comments on commit e4cc885

Please sign in to comment.