rano/graph/root.graphql
Ankit Patial 26a00c9f7c working on auth.
mailer, basic setup with html template and a dev treansport
2024-11-15 21:42:15 +05:30

51 lines
906 B
GraphQL

# GraphQL schema example
#
# https://gqlgen.com/getting-started/
type Mutation
type Query
"""
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
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