graphvent/gql_query.go

34 lines
750 B
Go

2023-07-21 15:16:35 -06:00
package graphvent
import (
"github.com/graphql-go/graphql"
)
2023-07-29 00:28:44 -06:00
var GQLQueryNode = &graphql.Field{
Type: GQLInterfaceNode.Interface,
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
2023-07-29 00:28:44 -06:00
ctx, err := PrepResolve(p)
if err != nil {
return nil, err
}
2023-07-29 00:28:44 -06:00
ctx.Context.Log.Logf("gql", "FieldASTs: %+v", p.Info.FieldASTs)
// Get a list of fields that will be written
// Send the read signal
// Wait for the response, returning an error on timeout
2023-07-21 15:16:35 -06:00
2023-07-29 00:28:44 -06:00
return nil, nil
},
}
2023-07-29 00:28:44 -06:00
var GQLQuerySelf = &graphql.Field{
Type: GQLInterfaceNode.Default,
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
2023-07-29 00:28:44 -06:00
_, err := PrepResolve(p)
if err != nil {
return nil, err
}
2023-07-21 15:16:35 -06:00
2023-07-29 00:28:44 -06:00
return nil, nil
},
2023-07-21 15:16:35 -06:00
}
2023-07-29 00:28:44 -06:00