Documentation
¶
Index ¶
- type Engine
- func (e *Engine) Connect() error
- func (e *Engine) Disconnect() error
- func (e *Engine) Do(ctx context.Context, query string, v interface{}) error
- func (e *Engine) ReplaceSchema(replace func(schema string) string)
- func (e *Engine) Request(ctx context.Context, method string, path string, payload interface{}) ([]byte, error)
- type GQLError
- type GQLRequest
- type GQLResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// Schema contains the prisma Schema
Schema string
// contains filtered or unexported fields
}
func (*Engine) Disconnect ¶
func (*Engine) ReplaceSchema ¶ added in v0.0.2
deprecated
type GQLError ¶
type GQLError struct {
Message string `json:"error"` // note: the query-engine uses 'error' instead of 'message'
Path []string `json:"path"`
Extensions map[string]interface{} `json:"query"`
}
GQLError is a GraphQL Error
type GQLRequest ¶
type GQLRequest struct {
Query string `json:"query"`
Variables map[string]interface{} `json:"variables"`
OperationName *string `json:"operationName"`
}
GQLRequest is the payload for GraphQL queries
type GQLResponse ¶
type GQLResponse struct {
Data json.RawMessage `json:"data"`
Errors []GQLError `json:"errors"`
Extensions map[string]interface{} `json:"extensions"`
}
GQLResponse is the payload for a GraphQL response
Click to show internal directories.
Click to hide internal directories.