mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 12:07:17 +00:00
195a72bf74
That's an initial PR mostly for code review, not ready for production use Got basic GraphQL working when querying a single block --------- Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
87 lines
2.5 KiB
YAML
87 lines
2.5 KiB
YAML
# Where are all the schema files located? globs are supported eg src/**/*.graphqls
|
|
schema:
|
|
- graph/*.graphqls
|
|
|
|
# Where should the generated server code go?
|
|
exec:
|
|
filename: graph/generated.go
|
|
package: graph
|
|
|
|
# Uncomment to enable federation
|
|
# federation:
|
|
# filename: graph/federation.go
|
|
# package: graph
|
|
|
|
# Where should any generated models go?
|
|
model:
|
|
filename: graph/model/models_gen.go
|
|
package: model
|
|
|
|
# Where should the resolver implementations go?
|
|
resolver:
|
|
layout: follow-schema
|
|
dir: graph
|
|
package: graph
|
|
|
|
# Optional: turn on use ` + "`" + `gqlgen:"fieldName"` + "`" + ` tags in your models
|
|
# struct_tag: json
|
|
|
|
# Optional: turn on to use []Thing instead of []*Thing
|
|
# omit_slice_element_pointers: false
|
|
|
|
# Optional: turn off to make struct-type struct fields not use pointers
|
|
# e.g. type Thing struct { FieldA OtherThing } instead of { FieldA *OtherThing }
|
|
# struct_fields_always_pointers: true
|
|
|
|
# Optional: turn off to make resolvers return values instead of pointers for structs
|
|
# resolvers_always_return_pointers: true
|
|
|
|
# Optional: set to speed up generation time by not performing a final validation pass.
|
|
skip_validation: true
|
|
|
|
# gqlgen will search for any type names in the schema in these go packages
|
|
# if they match it will use them, otherwise it will generate them.
|
|
autobind:
|
|
- "github.com/ledgerwatch/erigon/cmd/rpcdaemon/graphql/graph/model"
|
|
|
|
# This section declares type mapping between the GraphQL and go type systems
|
|
#
|
|
# The first line in each type will be used as defaults for resolver arguments and
|
|
# modelgen, the others will be allowed when binding to fields. Configure them to
|
|
# your liking
|
|
models:
|
|
Int:
|
|
model:
|
|
- github.com/99designs/gqlgen/graphql.Int
|
|
- github.com/99designs/gqlgen/graphql.Int64
|
|
- github.com/99designs/gqlgen/graphql.Int32
|
|
Long:
|
|
model:
|
|
- github.com/99designs/gqlgen/graphql.Uint64
|
|
BigInt:
|
|
model:
|
|
- github.com/99designs/gqlgen/graphql.String
|
|
Address:
|
|
model:
|
|
- github.com/99designs/gqlgen/graphql.String
|
|
Bytes:
|
|
model:
|
|
- github.com/99designs/gqlgen/graphql.String
|
|
Bytes32:
|
|
model:
|
|
- github.com/99designs/gqlgen/graphql.String
|
|
BlockNum:
|
|
model:
|
|
- github.com/99designs/gqlgen/graphql.String
|
|
- github.com/99designs/gqlgen/graphql.Uint64
|
|
# Block:
|
|
# fields:
|
|
# logs:
|
|
# resolver: true # force a resolver to be generated
|
|
# ommers:
|
|
# resolver: true # force a resolver to be generated
|
|
# transactions:
|
|
# resolver: true # force a resolver to be generated
|
|
|
|
omit_getters: true
|