Documentation
¶
Index ¶
- Constants
- func GetComplexity(t reflect.Type) int
- func WithPaginatedQueryLimit(limit int) func(options *PaginatedQueryGetOptions)
- type AssetIdParams
- type AssetIdsParams
- type BlockchainIdParams
- type Client
- func (c *Client) Authenticate(ctx context.Context, email string, password string, audience string, ...) error
- func (c *Client) ConstructRawQuery(q interface{}, variables map[string]interface{}) (string, error)
- func (c *Client) GetCurrentToken() JwtToken
- func (c *Client) MaxComplexity() int
- func (c *Client) Mutate(ctx context.Context, q interface{}, variables interface{}, ...) error
- func (c *Client) Query(ctx context.Context, q interface{}, variables interface{}, ...) error
- func (c *Client) SetJWTToken(token JwtToken, audience string)
- type ContainerLayer
- type EmptyParams
- type Id
- type IdParams
- type IdStringParams
- type IdStringsParams
- type IdsParams
- type JwtToken
- type Mutation
- func (m *Mutation[Payload, Params]) Execute(ctx context.Context, params Params) (Payload, error)
- func (m *Mutation[Payload, Params]) WithPayloadParam(name string, value interface{}) *Mutation[Payload, Params]
- func (m *Mutation[Payload, Params]) WithQueryParam(name string, value interface{}) *Mutation[Payload, Params]
- type NestedLayer
- type PageInfo
- type PaginatedQuery
- func (pq *PaginatedQuery[ResultType, Params]) Get(ctx context.Context, params Params, ...) ([]ResultType, error)
- func (pq *PaginatedQuery[ResultType, Params]) WithPayloadParam(name string, value interface{}) *PaginatedQuery[ResultType, Params]
- func (pq *PaginatedQuery[ResultType, Params]) WithQueryParam(name string, value interface{}) *PaginatedQuery[ResultType, Params]
- type PaginatedQueryGetOptions
- type Payload
- type Query
- func (r *Query[ReturnType, Params]) Get(ctx context.Context, params Params) (ReturnType, error)
- func (r *Query[ReturnType, Params]) WithPayloadParam(name string, value interface{}) *Query[ReturnType, Params]
- func (r *Query[ReturnType, Params]) WithQueryParam(name string, value interface{}) *Query[ReturnType, Params]
- type SignIn
- type SignInMutation
- type SignInParams
- type SlugParams
- type SlugsParams
- type Wrapper
Constants ¶
View Source
const ( MaxAuthenticatedQueryComplexity = 30000 MaxAnonymousQueryComplexity = 500 )
Variables ¶
This section is empty.
Functions ¶
func GetComplexity ¶
func WithPaginatedQueryLimit ¶
func WithPaginatedQueryLimit(limit int) func(options *PaginatedQueryGetOptions)
Types ¶
type AssetIdParams ¶
type AssetIdParams struct {
AssetId string `graphql:"assetId"`
}
type AssetIdsParams ¶
type AssetIdsParams struct {
AssetIds []string `graphql:"assetIds"`
}
type BlockchainIdParams ¶
type BlockchainIdParams struct {
BlockchainId string `graphql:"blockchainId"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Authenticate ¶
func (*Client) ConstructRawQuery ¶
func (*Client) GetCurrentToken ¶
func (*Client) MaxComplexity ¶
func (*Client) SetJWTToken ¶
type ContainerLayer ¶
type ContainerLayer[T any, P any] interface { GetInnerLayer() ContainerLayer[T, P] GetValue() T GetGraphQLType() string }
type EmptyParams ¶
type EmptyParams struct { }
type IdStringParams ¶
type IdStringParams struct {
Id string `graphql:"id"`
}
type IdStringsParams ¶
type IdStringsParams struct {
Ids []string `graphql:"ids"`
}
type Mutation ¶
func NewMutation ¶
func (*Mutation[Payload, Params]) WithPayloadParam ¶
func (*Mutation[Payload, Params]) WithQueryParam ¶
type NestedLayer ¶
type NestedLayer[T any, P any] struct { InnerLayer ContainerLayer[T, P] // contains filtered or unexported fields }
func (*NestedLayer[T, P]) GetGraphQLType ¶
func (nl *NestedLayer[T, P]) GetGraphQLType() string
func (*NestedLayer[T, P]) GetInnerLayer ¶
func (nl *NestedLayer[T, P]) GetInnerLayer() ContainerLayer[T, P]
func (*NestedLayer[T, P]) GetValue ¶
func (nl *NestedLayer[T, P]) GetValue() T
type PaginatedQuery ¶
type PaginatedQuery[ResultType any, Params any] struct { // contains filtered or unexported fields }
func NewPaginatedQuery ¶
func (*PaginatedQuery[ResultType, Params]) Get ¶
func (pq *PaginatedQuery[ResultType, Params]) Get( ctx context.Context, params Params, options ...func(options *PaginatedQueryGetOptions), ) ([]ResultType, error)
func (*PaginatedQuery[ResultType, Params]) WithPayloadParam ¶
func (pq *PaginatedQuery[ResultType, Params]) WithPayloadParam( name string, value interface{}, ) *PaginatedQuery[ResultType, Params]
func (*PaginatedQuery[ResultType, Params]) WithQueryParam ¶
func (pq *PaginatedQuery[ResultType, Params]) WithQueryParam( name string, value interface{}, ) *PaginatedQuery[ResultType, Params]
type PaginatedQueryGetOptions ¶
type PaginatedQueryGetOptions struct {
Limit int
}
type Payload ¶
type Payload[T any, P any] struct { OutermostLayer ContainerLayer[T, P] }
func NewPayload ¶
type Query ¶
func (*Query[ReturnType, Params]) WithPayloadParam ¶
func (*Query[ReturnType, Params]) WithQueryParam ¶
type SignInMutation ¶
type SignInMutation struct { *Mutation[SignIn, SignInParams] }
func NewSignInMutation ¶
func NewSignInMutation(c *Client, audience string) *SignInMutation
type SignInParams ¶
type SignInParams struct {
Input signInInput `graphql:"input"`
}
type SlugParams ¶
type SlugParams struct {
Slug string `graphql:"slug"`
}
type SlugsParams ¶
type SlugsParams struct {
Slugs []string `graphql:"slugs"`
}
type Wrapper ¶
func (Wrapper[T, P]) GetGraphQLType ¶
func (Wrapper[T, P]) GetGraphQLWrapped ¶
func (w Wrapper[T, P]) GetGraphQLWrapped() T
func (Wrapper[T, P]) GetInnerLayer ¶
func (w Wrapper[T, P]) GetInnerLayer() ContainerLayer[T, P]
Click to show internal directories.
Click to hide internal directories.