rano/graph/root.graphql

56 lines
933 B
GraphQL
Raw Normal View History

2024-11-01 14:25:30 +00:00
# GraphQL schema example
#
# https://gqlgen.com/getting-started/
type Mutation
type Query
2024-11-01 14:25:30 +00:00
2024-11-17 16:58:29 +00:00
scalar UID
scalar Int64
2024-11-01 14:25:30 +00:00
"""
Maps a Time GraphQL scalar to a Go time.Time struct.
"""
scalar Time
"""
type Map(Go type: map[string]interface{})
"""
scalar Map
"""
Go type interface{}
"""
scalar Any
2024-11-17 16:58:29 +00:00
2024-11-01 14:25:30 +00:00
scalar Void
"""
directive to map Go type
type User @goModel(model: "github.com/my/app/models.User") {
id: ID! @goField(name: "todoId")
name: String!
@goField(forceResolver: true)
@goTag(key: "xorm", value: "-")
@goTag(key: "yaml")
}
"""
directive @goModel(
model: String
models: [String!]
forceGenerate: Boolean
) on OBJECT | INPUT_OBJECT | SCALAR | ENUM | INTERFACE | UNION
"""
directive to map Go type
"""
directive @goField(
forceResolver: Boolean
name: String
omittable: Boolean
) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
directive @goTag(key: String!, value: String) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION