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,
|
2023-07-21 17:49:19 -06:00
|
|
|
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
|
2023-07-29 00:28:44 -06:00
|
|
|
ctx, err := PrepResolve(p)
|
2023-07-21 17:49:19 -06:00
|
|
|
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-21 17:49:19 -06:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2023-07-29 00:28:44 -06:00
|
|
|
var GQLQuerySelf = &graphql.Field{
|
2023-07-26 20:26:41 -06:00
|
|
|
Type: GQLInterfaceNode.Default,
|
2023-07-21 17:49:19 -06:00
|
|
|
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
|
2023-07-29 00:28:44 -06:00
|
|
|
_, err := PrepResolve(p)
|
2023-07-21 17:49:19 -06:00
|
|
|
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 17:49:19 -06:00
|
|
|
},
|
2023-07-21 15:16:35 -06:00
|
|
|
}
|
2023-07-29 00:28:44 -06:00
|
|
|
|