Documentation ¶
Index ¶
- Variables
- func ConfigJson(config Configuration) json.RawMessage
- func DeserializeRawResponse(response *bytes.Buffer) (*bytes.Buffer, error)
- func InstallPrismaDependencies(log *zap.Logger, wundergraphDir string) error
- func IntrospectPrismaDatabase(ctx context.Context, introspectionSchema, wundergraphDir string, ...) (prismaSchema, graphqlSDL, dmmf string, err error)
- func ReverseOriginSchemaCompatibility(doc *ast.Document) error
- type BinaryEngine
- type Configuration
- type Engine
- func (e *Engine) BinaryPlatformName() (string, error)
- func (e *Engine) FetchEngine(toDir string, engineName string, binaryPlatformName string) error
- func (e *Engine) GetEngineURL(engineName string, binaryPlatformName string) string
- func (e *Engine) IntrospectDMMF(ctx context.Context) (dmmf string, err error)
- func (e *Engine) IntrospectGraphQLSchema(ctx context.Context) (schema string, err error)
- func (e *Engine) IntrospectPrismaDatabaseSchema(ctx context.Context, introspectionSchema string) (string, error)
- func (e *Engine) Request(ctx context.Context, request []byte, rw io.Writer) (err error)
- func (e *Engine) StartQueryEngine(schema string) error
- func (e *Engine) StopQueryEngine()
- func (e *Engine) WaitUntilReady(ctx context.Context) error
- type Factory
- type GQLRequest
- type HybridEngine
- type IntrospectionParams
- type IntrospectionRequest
- type IntrospectionResponse
- type LazyEngine
- type LazyEngineFactory
- type Planner
- func (p *Planner) ConfigureFetch() plan.FetchConfiguration
- func (p *Planner) ConfigureSubscription() plan.SubscriptionConfiguration
- func (p *Planner) DataSourcePlanningBehavior() plan.DataSourcePlanningBehavior
- func (p *Planner) DownstreamResponseFieldAlias(downstreamFieldRef int) (alias string, exists bool)
- func (p *Planner) EnterArgument(_ int)
- func (p *Planner) EnterDocument(_, _ *ast.Document)
- func (p *Planner) EnterField(ref int)
- func (p *Planner) EnterInlineFragment(ref int)
- func (p *Planner) EnterOperationDefinition(ref int)
- func (p *Planner) EnterSelectionSet(ref int)
- func (p *Planner) LeaveDocument(_, _ *ast.Document)
- func (p *Planner) LeaveField(ref int)
- func (p *Planner) LeaveInlineFragment(_ int)
- func (p *Planner) LeaveOperationDefinition(_ int)
- func (p *Planner) LeaveSelectionSet(_ int)
- func (p *Planner) Register(visitor *plan.Visitor, configuration plan.DataSourceConfiguration, ...) error
- type PrismaType
- type RawJsonVariableRenderer
- type SingleTypeField
- type Source
- type TypedValue
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //PrismaBinaryVersion is taken from the commit sha of https://github.com/prisma/prisma-engines/releases/tag/4.15.0 PrismaBinaryVersion = "8fbc245156db7124f997f4cecdd8d1219e360944" EngineURL = "https://binaries.prisma.sh/all_commits/%s/%s/%s.gz" )
Functions ¶
func ConfigJson ¶
func ConfigJson(config Configuration) json.RawMessage
func DeserializeRawResponse ¶ added in v0.160.0
func ReverseOriginSchemaCompatibility ¶ added in v0.133.0
ReverseOriginSchemaCompatibility reverses the changes made to the schema by the origin schema compatibility It's currently not used because normalization doesn't work with the raw sql changes TODO: Fix normalization and use this function
Types ¶
type BinaryEngine ¶
type BinaryEngine struct {
// contains filtered or unexported fields
}
func (*BinaryEngine) Close ¶
func (e *BinaryEngine) Close()
func (*BinaryEngine) WaitUntilReady ¶ added in v0.111.0
func (e *BinaryEngine) WaitUntilReady(ctx context.Context) error
type Configuration ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) BinaryPlatformName ¶ added in v0.160.0
BinaryPlatformName returns the name of the prisma binary which should be used, for example "darwin" or "linux-openssl-1.1.x"
func (*Engine) FetchEngine ¶ added in v0.160.0
func (*Engine) GetEngineURL ¶ added in v0.160.0
func (*Engine) IntrospectDMMF ¶
func (*Engine) IntrospectGraphQLSchema ¶
func (*Engine) IntrospectPrismaDatabaseSchema ¶
func (*Engine) StartQueryEngine ¶
func (*Engine) StopQueryEngine ¶
func (e *Engine) StopQueryEngine()
type Factory ¶
type GQLRequest ¶
type GQLRequest struct { Query string `json:"query"` Variables json.RawMessage `json:"variables"` }
type HybridEngine ¶
type HybridEngine interface { Close() Execute(ctx context.Context, request []byte, w io.Writer) error WaitUntilReady(ctx context.Context) error }
func NewHybridEngine ¶
func NewHybridEngine(prismaSchema, wundergraphDir string, log *zap.Logger) (HybridEngine, error)
type IntrospectionParams ¶ added in v0.160.0
type IntrospectionRequest ¶
type IntrospectionRequest struct { ID int `json:"id"` JSONRPC string `json:"jsonrpc"` Method string `json:"method"` Params IntrospectionParams `json:"params"` }
type IntrospectionResponse ¶
type IntrospectionResponse struct { ID int `json:"id"` JSONRPC string `json:"jsonrpc"` Result struct { DataModel string `json:"datamodel"` } `json:"result"` Error *struct { Code int64 `json:"code"` Message string `json:"message"` Data struct { Message string `json:"message"` } `json:"data"` } `json:"error"` }
type LazyEngine ¶
type LazyEngine struct {
// contains filtered or unexported fields
}
func (*LazyEngine) Start ¶
func (e *LazyEngine) Start(closer <-chan struct{})
type LazyEngineFactory ¶
type LazyEngineFactory struct {
// contains filtered or unexported fields
}
func (*LazyEngineFactory) Engine ¶
func (f *LazyEngineFactory) Engine(prismaSchema, wundergraphDir string, closeTimeoutSeconds int64) *LazyEngine
type Planner ¶
type Planner struct {
// contains filtered or unexported fields
}
func (*Planner) ConfigureFetch ¶
func (p *Planner) ConfigureFetch() plan.FetchConfiguration
func (*Planner) ConfigureSubscription ¶
func (p *Planner) ConfigureSubscription() plan.SubscriptionConfiguration
func (*Planner) DataSourcePlanningBehavior ¶
func (p *Planner) DataSourcePlanningBehavior() plan.DataSourcePlanningBehavior
func (*Planner) DownstreamResponseFieldAlias ¶
func (*Planner) EnterArgument ¶
func (*Planner) EnterDocument ¶
func (*Planner) EnterField ¶
func (*Planner) EnterInlineFragment ¶
func (*Planner) EnterOperationDefinition ¶
func (*Planner) EnterSelectionSet ¶
func (*Planner) LeaveDocument ¶
func (*Planner) LeaveField ¶
func (*Planner) LeaveInlineFragment ¶
func (*Planner) LeaveOperationDefinition ¶
func (*Planner) LeaveSelectionSet ¶
type PrismaType ¶ added in v0.160.0
type PrismaType string
const ( Int PrismaType = "int" BigInt PrismaType = "bigint" Float PrismaType = "float" Double PrismaType = "double" String PrismaType = "string" Enum PrismaType = "enum" Bytes PrismaType = "bytes" Bool PrismaType = "bool" Char PrismaType = "char" Decimal PrismaType = "decimal" JSON PrismaType = "json" XML PrismaType = "xml" UUID PrismaType = "uuid" Datetime PrismaType = "datetime" Date PrismaType = "date" Time PrismaType = "time" Array PrismaType = "array" Null PrismaType = "null" )
type RawJsonVariableRenderer ¶ added in v0.133.0
type RawJsonVariableRenderer struct {
// contains filtered or unexported fields
}
func (*RawJsonVariableRenderer) GetKind ¶ added in v0.133.0
func (r *RawJsonVariableRenderer) GetKind() string
func (*RawJsonVariableRenderer) RenderVariable ¶ added in v0.133.0
type SingleTypeField ¶
type TypedValue ¶ added in v0.160.0
type TypedValue struct { PrismaType PrismaType `json:"prisma__type"` PrismaValue interface{} `json:"prisma__value"` }
Click to show internal directories.
Click to hide internal directories.