From 164ec92ffd6ae1903f83f4de7fb47dd82bdbef78 Mon Sep 17 00:00:00 2001 From: Daniel Vladco Date: Sun, 25 Dec 2022 20:43:17 +0200 Subject: [PATCH] Add docs using mkdocs (#49) * docs: add mkdocs config and split the existing readme into separate docs * fix: make examples work again * fix: make examples work again * fix: make examples work again --- .github/workflows/master.yml | 86 +- Dockerfile | 6 +- README.md | 24 + Readme.md | 65 - cmd/gateway/main.go | 14 +- cmd/gateway/test.yaml | 20 - cmd/{protogql => proto2graphql}/main.go | 16 +- docs/1.protoc-gen-gql.md | 41 + docs/2.protoc-gen-gogql.md | 43 + docs/3.proto2graphql.md | 20 + docs/4.gateway.md | 112 + docs/index.md | 9 + example/codegen/Makefile | 33 - example/codegen/api/Makefile | 29 + example/codegen/api/go.mod | 22 + example/codegen/api/go.sum | 251 + .../{ => api}/gql/options/generated.go | 3701 ++++++-- .../codegen/{ => api}/gqlgen-constructs.yaml | 8 +- example/codegen/api/gqlgen-options.yaml | 12 + .../graphql}/constructs/generated.go | 7700 ++++++++++++----- .../codegen/api/graphql/options/generated.go | 7004 +++++++++++++++ .../{ => api}/pb/constructs.gqlgen.pb.go | 8 +- .../codegen/{ => api}/pb/constructs.graphql | 26 +- example/codegen/{ => api}/pb/constructs.pb.go | 75 +- example/codegen/{ => api}/pb/constructs.proto | 0 .../{ => api}/pb/constructs_grpc.pb.go | 32 +- .../codegen/{ => api}/pb/options.gqlgen.pb.go | 0 example/codegen/{ => api}/pb/options.graphql | 0 example/codegen/{ => api}/pb/options.pb.go | 159 +- example/codegen/{ => api}/pb/options.proto | 2 +- .../codegen/{ => api}/pb/options_grpc.pb.go | 4 + example/codegen/api/tools/tools.go | 8 + example/codegen/go.mod | 29 + example/codegen/go.sum | 254 + example/codegen/gqlgen-options.yaml | 12 - example/codegen/main.go | 56 +- example/gateway/Makefile | 12 +- example/gateway/config.json | 6 - example/gateway/config.yaml | 20 + .../constructsserver/pb/constructs.pb.go | 23 +- .../constructsserver/pb/constructs_grpc.pb.go | 28 +- example/gateway/docker-compose.yaml | 2 +- example/gateway/optionsserver/main.go | 2 +- .../gateway/optionsserver/pb/options.pb.go | 175 +- .../gateway/optionsserver/pb/options.proto | 2 +- .../optionsserver/pb/options_grpc.pb.go | 42 +- go.mod | 51 +- go.sum | 205 +- mkdocs.yml | 71 + pkg/generator/utils.go | 48 +- pkg/graphqlpb/graphql.pb.go | 282 +- pkg/protoparser/parser.go | 2 +- pkg/server/config.go | 10 + pkg/server/gateway.go | 5 - protoc-gen-gogql/main.go | 4 +- scripts/install-protoc.sh | 37 +- test/gateway_test.go | 2 - test/generator_test.go | 2 + test/testdata/gateway-expect.graphql | 16 +- 59 files changed, 16876 insertions(+), 4052 deletions(-) create mode 100644 README.md delete mode 100644 Readme.md delete mode 100644 cmd/gateway/test.yaml rename cmd/{protogql => proto2graphql}/main.go (85%) create mode 100644 docs/1.protoc-gen-gql.md create mode 100644 docs/2.protoc-gen-gogql.md create mode 100644 docs/3.proto2graphql.md create mode 100644 docs/4.gateway.md create mode 100644 docs/index.md delete mode 100644 example/codegen/Makefile create mode 100644 example/codegen/api/Makefile create mode 100644 example/codegen/api/go.mod create mode 100644 example/codegen/api/go.sum rename example/codegen/{ => api}/gql/options/generated.go (61%) rename example/codegen/{ => api}/gqlgen-constructs.yaml (83%) create mode 100644 example/codegen/api/gqlgen-options.yaml rename example/codegen/{gql => api/graphql}/constructs/generated.go (67%) create mode 100644 example/codegen/api/graphql/options/generated.go rename example/codegen/{ => api}/pb/constructs.gqlgen.pb.go (98%) rename example/codegen/{ => api}/pb/constructs.graphql (96%) rename example/codegen/{ => api}/pb/constructs.pb.go (96%) rename example/codegen/{ => api}/pb/constructs.proto (100%) rename example/codegen/{ => api}/pb/constructs_grpc.pb.go (93%) rename example/codegen/{ => api}/pb/options.gqlgen.pb.go (100%) rename example/codegen/{ => api}/pb/options.graphql (100%) rename example/codegen/{ => api}/pb/options.pb.go (62%) rename example/codegen/{ => api}/pb/options.proto (98%) rename example/codegen/{ => api}/pb/options_grpc.pb.go (99%) create mode 100644 example/codegen/api/tools/tools.go create mode 100644 example/codegen/go.mod create mode 100644 example/codegen/go.sum delete mode 100644 example/codegen/gqlgen-options.yaml delete mode 100644 example/gateway/config.json create mode 100644 example/gateway/config.yaml create mode 100644 mkdocs.yml diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 52fc2b8..a899a93 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -3,12 +3,10 @@ name: Go on: [ push ] jobs: - - build: - name: Build + tests: + name: Tests runs-on: ubuntu-latest steps: - - name: Set up Go 1.x uses: actions/setup-go@v2 with: @@ -18,10 +16,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@master - - name: Build - run: CGO_ENABLED=0 GOOS=linux go build -v ./cmd/gateway - - - name: Test and coverage + - name: Run tests with coverage run: | go test -v `go list ./... | grep -v example | grep -v tools` -coverprofile=coverage.tmp.txt -covermode=atomic -coverpkg=github.com/danielvladco/go-proto-gql/... cat coverage.tmp.txt | grep -v .pb.go > coverage.txt @@ -34,6 +29,79 @@ jobs: flags: unittests name: codecov-umbrella + sanity_checks: + name: Sanity checks + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.16 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@master + + - name: Go fmt + run: | + go fmt ./... + + files=$(git diff --name-only) + if [[ -n $files ]]; then + echo "The following files are not formatted correctly:" + echo $files + exit 1 + fi + - name: Go mod is tidy + run: | + go mod tidy + pushd example/codegen + go mod tidy + popd + pushd example/codegen/api + go mod tidy + popd + + files=$(git diff --name-only) + if [[ -n $files ]]; then + echo "Detected changes to the files after mod tidy (please run `go mod tidy` and push again):" + echo $files + exit 1 + fi + + - name: Generated files are up to date + run: | + make + pushd example/codegen/api + make + popd + pushd example/gateway + make + popd + + files=$(git diff --name-only) + if [[ -n $files ]]; then + echo "Detected changes to the files after generating (please run make and push again):" + echo $files + exit 1 + fi + + build_push_gateway: + name: Build & Push Gateway + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.16 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@master + + - name: Build + run: CGO_ENABLED=0 GOOS=linux go build -v ./cmd/gateway + - name: Build and push Docker images uses: docker/build-push-action@v1.1.0 with: @@ -44,7 +112,7 @@ jobs: # Server address of Docker registry. If not set then will default to Docker Hub registry: docker.pkg.github.com # Docker repository to tag the image with - repository: ${{ github.repository }}danielvladco/go-proto-gql/gateway + repository: ${{ github.repository }}/gateway # Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags tag_with_sha: true tag_with_ref: true diff --git a/Dockerfile b/Dockerfile index f2c746a..d3a3316 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,6 @@ FROM scratch WORKDIR /opt COPY gateway ./gateway -COPY ./cmd/gateway/test.yaml config.yaml -ENTRYPOINT ["./gateway", "--cfg", "./config.yaml"] - -CMD ["./gateway", "--cfg", "./config.yaml"] +ENTRYPOINT ["./gateway"] +CMD ["./gateway"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..4cb999a --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +[![codecov](https://codecov.io/gh/danielvladco/go-proto-gql/branch/refactor-and-e2e-tests/graph/badge.svg?token=L3N8kUGpGV)](https://codecov.io/gh/danielvladco/go-proto-gql) + +This project aims to solve the problem of communication between services that use different API protocols. +Such as GraphAL and gRPC. + +Let's say your backend services use gRPC for fast and reliable communication however your frontend uses GraphQL. +Normally your only two options: + +1. Either expose gRPC endpoints alongside GraphQL endpoints or build and +2. Maintain another service that acts as a gateway between your backend infrastructure and frontend application. + +This project provides tools to help you build your API much quicker for both of these cases. + +1. Use `protoc-gen-gql`, `protoc-gen-gogql` and `proto2graphql` to generate boilerplate code on your backend. +2. Spin up a gateway and convey the messages from one protocol to the other on the fly! + +Check out the docs for getting started and usage examples at: https://danielvladco.github.io/go-proto-gql/ + +## Community: +Will be happy for any contributions. So feel free to create issues, forks and PRs. + +## License: + +`go-proto-gql` is released under the Apache 2.0 license. See the LICENSE file for details. diff --git a/Readme.md b/Readme.md deleted file mode 100644 index 354ff09..0000000 --- a/Readme.md +++ /dev/null @@ -1,65 +0,0 @@ -[![codecov](https://codecov.io/gh/danielvladco/go-proto-gql/branch/refactor-and-e2e-tests/graph/badge.svg?token=L3N8kUGpGV)](https://codecov.io/gh/danielvladco/go-proto-gql) - -Protoc plugins for generating graphql schema and go graphql code - -If you use micro-service architecture with grpc for back-end and graphql api gateway for front-end, you will find yourself -repeating a lot of code for translating from one transport layer to another (which many times may be a source of bugs) - -This repository aims to simplify working with grpc trough protocol buffers and graphql by generating code. - -Install: -- - -```sh -go install github.com/danielvladco/go-proto-gql/protoc-gen-gql -go install github.com/danielvladco/go-proto-gql/protoc-gen-gogql -``` - -Usage Examples: -- -The protoc compiler expects to find plugins named `proto-gen-` on the execution `$PATH`. So first: - -```sh -export PATH=${PATH}:${GOPATH}/bin -``` - ---- -`--gql_out` plugin will generate graphql files with extension `.graphqls` -rather than go code which means it can be further used for any other language or framework. - -Example: -```sh -protoc --gql_out=paths=source_relative:. -I=. -I=./example/ ./example/*.proto -``` - -If you still want to generate go source code instead of graphql then use -http://github.com/99designs/gqlgen plugin, and map all the generated go types with all the generated graphql types. -Luckily `--gqlgencfg_out` plugin does exactly this. - ---- -`--gogql_out` plugin generates methods for implementing -`github.com/99designs/gqlgen/graphql.Marshaler` and `github.com/99designs/gqlgen/graphql.Unmarshaler` interfaces. Now proto `enum`s, `oneof`s and `map`s will work fine with graphql. - -This plugin also creates convenience methods that will implement generated by the `gqlgen` `MutationResolver` and `QueryResolver` interfaces. - -Example: -```sh -protoc --gogql_out=gogoimport=false,paths=source_relative:. -I=. -I=./example/ ./example/*.proto -``` - ---- -See `/example` folder for more examples. - -## Gateway (alpha) -A unified gateway is also possible. Right now a gateway can be spawn up -pointing to a list of grpc endpoints (grpc reflection must be enabled on the grpc servers). -The gateway will query the servers for protobuf descriptors and generate a graphql schema abstract tree. -The requests to the gateway will be transformed on the fly to grpc servers without any additional code generation -or writing any code at all. See `examples/gateway` for usage more info. - -## Community: -Will be very glad for any contributions so feel free to create issues, forks and PRs. - -## License: - -`go-proto-gql` is released under the Apache 2.0 license. See the LICENSE file for details. diff --git a/cmd/gateway/main.go b/cmd/gateway/main.go index 579b16b..092321f 100644 --- a/cmd/gateway/main.go +++ b/cmd/gateway/main.go @@ -12,17 +12,19 @@ import ( ) var ( - configFile = flag.String("cfg", "/opt/config.json", "") + configFile = flag.String("config", "", "The config file (if not set will use the default configuration)") ) func main() { flag.Parse() - f, err := os.Open(*configFile) - fatalOnErr(err) - cfg := &server.Config{} - err = yaml.NewDecoder(f).Decode(cfg) - fatalOnErr(err) + cfg := server.DefaultConfig() + if *configFile != "" { + f, err := os.Open(*configFile) + fatalOnErr(err) + err = yaml.NewDecoder(f).Decode(cfg) + fatalOnErr(err) + } l, err := net.Listen("tcp", cfg.Address) fatalOnErr(err) diff --git a/cmd/gateway/test.yaml b/cmd/gateway/test.yaml deleted file mode 100644 index bee2f92..0000000 --- a/cmd/gateway/test.yaml +++ /dev/null @@ -1,20 +0,0 @@ -docs: true -cors: -address: ":8080" -grpc: -# import_paths: -# - ./api - services: - - address: "localhost:8080" -# authentication: -# tls: -# certificate: "" -# privateKey: "" - reflection: true - - address: "localhost:8082" - reflection: true -# authentication: -# insecure: true -# proto_files: -# - ./constructs.proto -# - ./options.proto diff --git a/cmd/protogql/main.go b/cmd/proto2graphql/main.go similarity index 85% rename from cmd/protogql/main.go rename to cmd/proto2graphql/main.go index c1215c6..03c2602 100644 --- a/cmd/protogql/main.go +++ b/cmd/proto2graphql/main.go @@ -2,9 +2,6 @@ package main import ( "flag" - "github.com/danielvladco/go-proto-gql/pkg/protoparser" - "google.golang.org/protobuf/compiler/protogen" - "google.golang.org/protobuf/types/pluginpb" "log" "os" "path" @@ -12,13 +9,16 @@ import ( "strings" "github.com/danielvladco/go-proto-gql/pkg/generator" + "github.com/danielvladco/go-proto-gql/pkg/protoparser" "github.com/vektah/gqlparser/v2/formatter" + "google.golang.org/protobuf/compiler/protogen" + "google.golang.org/protobuf/types/pluginpb" ) type arrayFlags []string func (i *arrayFlags) String() string { - return "str list" + return strings.Join(*i, ",") } func (i *arrayFlags) Set(value string) error { @@ -35,14 +35,14 @@ var ( ) func main() { - flag.Var(&importPaths, "I", "path") - flag.Var(&fileNames, "f", "path") + flag.Var(&importPaths, "I", "Specify the directory in which to search for imports. May be specified multiple times. May be specified multiple times.") + flag.Var(&fileNames, "f", "Parse proto files and generate graphql based on the options given. May be specified multiple times.") flag.Parse() descs, err := protoparser.Parse(importPaths, fileNames) fatal(err) p, err := protogen.Options{}.New(&pluginpb.CodeGeneratorRequest{ - FileToGenerate: fileNames, - ProtoFile: generator.ResolveProtoFilesRecursively(descs).AsFileDescriptorProto(), + FileToGenerate: fileNames, + ProtoFile: generator.ResolveProtoFilesRecursively(descs).AsFileDescriptorProto(), }) fatal(err) gqlDesc, err := generator.NewSchemas(descs, *merge, *svc, p) diff --git a/docs/1.protoc-gen-gql.md b/docs/1.protoc-gen-gql.md new file mode 100644 index 0000000..ff5d53d --- /dev/null +++ b/docs/1.protoc-gen-gql.md @@ -0,0 +1,41 @@ +# Plugin protoc-gen-gql + +`protoc-gen-gql` plugin will generate graphql files with extension `.graphqls` +rather than go code which means it can be further used for any other language or framework. + +> :warning: The GraphQL objects will only be generated for the gRPC messages of other types that are used in a service either as a input value or a return value (For details check #1) + +## Install + +```sh +go install github.com/danielvladco/go-proto-gql/protoc-gen-gql@latest +``` + +The protoc compiler expects to find plugins named `proto-gen-` on the execution `$PATH`. + +So first add golang bin directory to the path if it's not already added (also add it to `.zshrc` or `~/.bash_profile` depending on the OS you use): + +```sh +export PATH=${PATH}:$(go env GOPATH)/bin +``` + +## Usage +Run the `protoc` command with the arguments for the installed plugin: + +Like this: + +```sh +protoc --gql_out=: -I=./api -I=. ./example/codegen/api/pb/*.proto +``` + +Where `ADDITIONAL_ARGUMENTS` may be provided in the form of `key=value` separated by a comma. + +Possible additional arguments: +- `svc` bool - Use service annotations for nodes corresponding to a GRPC call. +- `merge` bool - Merge all the proto files found in one directory into one graphql file. +- `ext` string - Extension of the graphql file, Default: '.graphql' (default "graphql"). + +## Example +```sh +protoc --gql_out=svc=true:. -I=./api -I=. ./example/codegen/api/pb/*.proto +``` diff --git a/docs/2.protoc-gen-gogql.md b/docs/2.protoc-gen-gogql.md new file mode 100644 index 0000000..996ad58 --- /dev/null +++ b/docs/2.protoc-gen-gogql.md @@ -0,0 +1,43 @@ +# Plugin protoc-gen-gogql + +If you still want to generate go source code instead of graphql then use +http://github.com/99designs/gqlgen plugin, and map all the generated go types with all the generated graphql types. + +`protoc-gen-gogql` plugin generates methods for implementing +`github.com/99designs/gqlgen/graphql.Marshaler` and `github.com/99designs/gqlgen/graphql.Unmarshaler` interfaces. Now proto `enum`s, `oneof`s and `map`s will work fine with graphql. + +This plugin also creates convenience methods that will implement generated by the `gqlgen` `MutationResolver` and `QueryResolver` interfaces. + +## Install + +```sh +go install github.com/danielvladco/go-proto-gql/protoc-gen-gogql@latest +``` + +The protoc compiler expects to find plugins named `proto-gen-` on the execution `$PATH`. + +So first add golang bin directory to the path if it's not already added (also add it to `.zshrc` or `~/.bash_profile` depending on the OS you use): + +```sh +export PATH=${PATH}:$(go env GOPATH)/bin +``` + +## Usage +Run the `protoc` command with the arguments for the installed plugin: + +Like this: + +```sh +protoc --gql_out=: -I=./api -I=. ./example/codegen/api/pb/*.proto +``` + +Where `ADDITIONAL_ARGUMENTS` may be provided in the form of `key=value` separated by a comma. + +Possible additional arguments: +- `svc` bool - Use service annotations for nodes corresponding to a GRPC call. +- `merge` bool - Merge all the proto files found in one directory into one file. + +## Example +```sh +protoc --gogql_out=paths=source_relative:. -I=./api -I=. ./example/codegen/api/pb/*.proto +``` diff --git a/docs/3.proto2graphql.md b/docs/3.proto2graphql.md new file mode 100644 index 0000000..77cde0b --- /dev/null +++ b/docs/3.proto2graphql.md @@ -0,0 +1,20 @@ +# CLI tool proto2graphql + +`proto2graphql` is similar to `protoc-gen-gql` except it doesn't require `protoc` binary to run +and therefore is much simpler ro use + +> :warning: The GraphQL objects will only be generated for the gRPC messages of other types that are used in a service either as a input value or a return value (For details check #1) + +## Install + +```sh +go install github.com/danielvladco/go-proto-gql/cmd/proto2graphql@latest +``` + +## Usage +Usage of proto2graphql: +- `-I` string - Specify the directory in which to search for imports. May be specified multiple times. May be specified multiple times. +- `-f` string - Parse proto files and generate graphql based on the options given. May be specified multiple times. +- `-ext` string - Extension of the graphql file, Default: '.graphql' (default "graphql"). +- `-merge` - Merge all the proto files found in one directory into one graphql file. +- `-svc` - Use service annotations for nodes corresponding to a GRPC call. diff --git a/docs/4.gateway.md b/docs/4.gateway.md new file mode 100644 index 0000000..446ab06 --- /dev/null +++ b/docs/4.gateway.md @@ -0,0 +1,112 @@ +# Gateway (PoC) + +At this point we have a PoC gateway that will translate the messages on the fly. + +The gateway can be configured in two modes: + +pointing to a list of grpc endpoints (grpc reflection must be enabled on the grpc servers). +The gateway will query the servers for protobuf descriptors and generate a graphql schema abstract tree. +The requests to the gateway will be transformed on the fly to grpc servers without any additional code generation +or writing any code at all. See `examples/gateway` for usage more info. + +## Config the gateway + +To configure the gateway create a `config.yaml` file and provide it to our gateway executable via `--config` flag. + +For example: `./gateway --config config.yaml` + +Gateway config options: + +```yaml +# Generate documentation from the comments left in proto files +docs: true + +# Cors configuration for more details check https://github.com/rs/cors/blob/master/cors.go#L32 +cors: { } + +# The address to serve the gateway on (Default :8080) +address: ":8080" + +# Start the gateway with TLS +tls: + # Path to the TLS certificate + certificate: "" + + # Path to the TLS private key + private_key: "" + +# gRPC config options (It is made as a separate category because in the future we can add other protocols too, +# such as: OpenAPI, OpenRPC, GraphQL, etc. +grpc: + # Import paths provided to the proto parser it is similar to `-I` or `--proto_path` flag on `protoc` cli tool. + # It is required if your services import proto files. + import_paths: + - ./api + + services: + # The gRPC server address + - address: "localhost:8081" + # Authentication options to connect to the gRPC server if needed, otherwise will use insecure connection. + authentication: + # Authenticate using TLC + tls: + # Path to the TLS certificate + certificate: "" + + # Path to the TLS private key + private_key: "" + + # Enable automatic discovery if the gRPC server has enabled reflection. + # Cannot be used together with `proto_files` option. + reflection: true + + # The entry proto file where the gRPC services are defined. + # If your proto files have any dependencies they should be present in one of the specified `import_paths` + proto_files: + - ./grpc_service.proto +``` + +## Docker image + +A docker image with the gateway is also available with the latest tags: + +To run the gateway using docker run: + +```sh +docker run ghcr.io/danielvladco/go-proto-gql/gateway +``` + +## Example + +In this example we will spin up two gRPC servers and a gateway server that points to them. + +To run the demo example follow the next steps: + +- Go to `./example/gateway/` +- Run `docker-compose up` +- Navigate to `http://localhost:8080/playground` in your browser +- Have fun sending requests to the gRPC servers directly from your browser! + +## Supported features + +- [x] Run with TLS certificates +- [x] Cors +- [x] GRPC authentication + * [x] TLS authentication + * [ ] GRPC other authentication methods (more research required) +- [x] GRPC reflection +- [x] Proto files parsing +- [x] Adapt gRPC to GraphQL + * [x] GRPC call to Mutation + * [x] GRPC call to Query + * [ ] GRPC stream to Subscription + * [x] Proto messages to GraphQL types + * [x] Proto messages to GraphQL inputs + * [x] Proto enums to GraphQL enums + * [x] Proto maps to GraphQL array of types for map entries + * [x] Proto maps to GraphQL array of inputs for map entries + * [x] Proto oneofs to GraphQL unions + * [x] Proto oneofs to GraphQL directive attached to the fields that must be unique +- [ ] Adapt OpenAPI to GraphQL [#45](https://github.com/danielvladco/go-proto-gql/issues/45) +- [ ] Adapt OpenRPC to GraphQL [#46](https://github.com/danielvladco/go-proto-gql/issues/46) +- [ ] Proxy GraphQL to GraphQL [#47](https://github.com/danielvladco/go-proto-gql/issues/47) diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..13dc8e4 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,9 @@ +# Getting Started + +There are three ways to use this library: + +1. Using the [protoc](https://github.com/protocolbuffers/protobuf) tool and extending it with plugins to generate [graphql](1.protoc-gen-gql.md) schema and [golang](2.protoc-gen-gogql.md) bindings. +2. Generating the graphql schema using [proto2graphql](3.proto2graphql.md) (use this if you don't want to install `protoc`) +3. Configuring a [gateway](4.gateway.md) that will translate the messages from one protocol to other on the fly. + +For more examples check: [example](https://github.com/danielvladco/go-proto-gql/tree/master/example) diff --git a/example/codegen/Makefile b/example/codegen/Makefile deleted file mode 100644 index 2850978..0000000 --- a/example/codegen/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -.PHONY: start -start: generate - go run ./main.go - -.PHONY: generate -generate: gen-gqlgen-constructs gen-gqlgen-options - -.PHONY: gen-gogql-% -gen-gogql-%: - protoc --gogql_out=paths=source_relative:. -I ../../pb ./pb/$*.proto --experimental_allow_proto3_optional - -.PHONY: gen-pb-grpc-% -gen-pb-grpc-%: - protoc --go-grpc_out=paths=source_relative:. -I ../../pb ./pb/$*.proto --experimental_allow_proto3_optional - -.PHONY: gen-pb-% -gen-pb-%: - protoc --go_out=paths=source_relative:. -I ../../pb ./pb/$*.proto --experimental_allow_proto3_optional - -.PHONY: gen-gql-% -gen-gql-%: - protoc --gql_out=svc=true:. -I ../../pb ./pb/$*.proto --experimental_allow_proto3_optional - -.PHONY: gen-gqlgen-% -gen-gqlgen-%: gen-gql-% gen-gogql-% gen-pb-% gen-pb-grpc-% - gqlgen --config ./gqlgen-$*.yaml - -.PHONY: clean-% -clean-%: - rm -rf pb/$*.gqlgen.pb.go pb/$*_grpc.pb.go pb/$*.pb.go pb/$*.graphqls gql/$*/generated.go - -.PHONY: clean -clean: clean-constructs clean-options diff --git a/example/codegen/api/Makefile b/example/codegen/api/Makefile new file mode 100644 index 0000000..d8ffd06 --- /dev/null +++ b/example/codegen/api/Makefile @@ -0,0 +1,29 @@ +.PHONY: generate +generate: gen-gqlgen-constructs gen-gqlgen-options + +.PHONY: gen-gogql-% +gen-gogql-%: + protoc --gogql_out=paths=source_relative:. -I ../../../api -I . ./pb/$*.proto --experimental_allow_proto3_optional + +.PHONY: gen-pb-grpc-% +gen-pb-grpc-%: + protoc --go-grpc_out=paths=source_relative:. -I ../../../api -I . ./pb/$*.proto --experimental_allow_proto3_optional + +.PHONY: gen-pb-% +gen-pb-%: + protoc --go_out=paths=source_relative:. -I ../../../api -I . ./pb/$*.proto --experimental_allow_proto3_optional + +.PHONY: gen-gql-% +gen-gql-%: + protoc --gql_out=svc=true:. -I ../../../api -I . ./pb/$*.proto --experimental_allow_proto3_optional + +.PHONY: gen-gqlgen-% +gen-gqlgen-%: gen-gql-% gen-gogql-% gen-pb-% gen-pb-grpc-% + gqlgen --config ./gqlgen-$*.yaml + +.PHONY: clean-% +clean-%: + rm -rf pb/$*.gqlgen.pb.go pb/$*_grpc.pb.go pb/$*.pb.go pb/$*.graphql graphql/$*/generated.go + +.PHONY: clean +clean: clean-constructs clean-options diff --git a/example/codegen/api/go.mod b/example/codegen/api/go.mod new file mode 100644 index 0000000..1803282 --- /dev/null +++ b/example/codegen/api/go.mod @@ -0,0 +1,22 @@ +module github.com/danielvladco/go-proto-gql/example/codegen/api + +go 1.17 + +require ( + github.com/99designs/gqlgen v0.17.22 + github.com/danielvladco/go-proto-gql v0.9.0 + github.com/golang/protobuf v1.5.2 + github.com/vektah/gqlparser/v2 v2.5.1 + google.golang.org/grpc v1.51.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + github.com/agnivade/levenshtein v1.1.1 // indirect + golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect + golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect + golang.org/x/text v0.4.0 // indirect + google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect +) + +replace github.com/danielvladco/go-proto-gql v0.9.0 => ../../.. diff --git a/example/codegen/api/go.sum b/example/codegen/api/go.sum new file mode 100644 index 0000000..9e32550 --- /dev/null +++ b/example/codegen/api/go.sum @@ -0,0 +1,251 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/99designs/gqlgen v0.17.15/go.mod h1:IXeS/mdPf7JPkmqvbRKjCAV+CLxMKe6vXw6yD9vamB8= +github.com/99designs/gqlgen v0.17.22 h1:TOcrF8t0T3I0za9JD3CB6ehq7dDEMjR9Onikf8Lc/04= +github.com/99designs/gqlgen v0.17.22/go.mod h1:BMhYIhe4bp7OlCo5I2PnowSK/Wimpv/YlxfNkqZGwLo= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= +github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= +github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= +github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/graph-gophers/dataloader v5.0.0+incompatible/go.mod h1:jk4jk0c5ZISbKaMe8WsVopGB5/15GvGHMdMdPtwlRp4= +github.com/graphql-go/graphql v0.7.10-0.20210411022516-8a92e977c10b/go.mod h1:k6yrAYQaSP59DC5UVxbgxESlmVyojThKdORUqGDGmrI= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/jhump/protoreflect v1.7.1/go.mod h1:RZkzh7Hi9J7qT/sPlWnJ/UwZqCJvciFxKDA0UCeltSM= +github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= +github.com/matryer/moq v0.2.7/go.mod h1:kITsx543GOENm48TUAQyJ9+SAvFSr7iGQXPoth/VUBk= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/nautilus/gateway v0.3.3/go.mod h1:ScTIYRI7EsVh4Zow+HCChmox7h1tZPscmCQQ8pziSq8= +github.com/nautilus/graphql v0.0.20/go.mod h1:UYcs/gBtuFrZyX591SuYboby4xFNG9ZkaTYk7BBSRak= +github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/urfave/cli/v2 v2.8.1/go.mod h1:Z41J9TPoffeoqP0Iza0YbAhGvymRdZAd2uPmZ5JxRdY= +github.com/vektah/gqlparser/v2 v2.0.1/go.mod h1:SyUiHgLATUR8BiYURfTirrTcGpcE+4XkV2se04Px1Ms= +github.com/vektah/gqlparser/v2 v2.4.8/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= +github.com/vektah/gqlparser/v2 v2.5.1 h1:ZGu+bquAY23jsxDRcYpWjttRZrUz07LbiY77gUOHcr4= +github.com/vektah/gqlparser/v2 v2.5.1/go.mod h1:mPgqFBu/woKTVYWyNk8cO3kh4S/f4aRFZrvOnp3hmCs= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0/go.mod h1:DNq5QpG7LJqD2AamLZ7zvKE0DEpVl2BSEVjFycAAjRY= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= diff --git a/example/codegen/gql/options/generated.go b/example/codegen/api/gql/options/generated.go similarity index 61% rename from example/codegen/gql/options/generated.go rename to example/codegen/api/gql/options/generated.go index 35f24c5..9f41d08 100644 --- a/example/codegen/gql/options/generated.go +++ b/example/codegen/api/gql/options/generated.go @@ -14,7 +14,7 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/danielvladco/go-proto-gql/example/codegen/pb" + "github.com/danielvladco/go-proto-gql/example/codegen/api/pb" gqlparser "github.com/vektah/gqlparser/v2" "github.com/vektah/gqlparser/v2/ast" ) @@ -64,11 +64,11 @@ type ComplexityRoot struct { String_ func(childComplexity int) int } - DataParam1 struct { + Data_Param1 struct { Param1 func(childComplexity int) int } - DataParam2 struct { + Data_Param2 struct { Param2 func(childComplexity int) int } @@ -220,18 +220,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Data.String_(childComplexity), true case "Data_Param1.param1": - if e.complexity.DataParam1.Param1 == nil { + if e.complexity.Data_Param1.Param1 == nil { break } - return e.complexity.DataParam1.Param1(childComplexity), true + return e.complexity.Data_Param1.Param1(childComplexity), true case "Data_Param2.param2": - if e.complexity.DataParam2.Param2 == nil { + if e.complexity.Data_Param2.Param2 == nil { break } - return e.complexity.DataParam2.Param2(childComplexity), true + return e.complexity.Data_Param2.Param2(childComplexity), true case "Foo2.param1": if e.complexity.Foo2.Param1 == nil { @@ -487,6 +487,10 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { rc := graphql.GetOperationContext(ctx) ec := executionContext{rc, e} + inputUnmarshalMap := graphql.BuildUnmarshalerMap( + ec.unmarshalInputDataInput, + ec.unmarshalInputFoo2Input, + ) first := true switch rc.Operation.Operation { @@ -496,6 +500,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { return nil } first = false + ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) data := ec._Query(ctx, rc.Operation.SelectionSet) var buf bytes.Buffer data.MarshalGQL(&buf) @@ -510,6 +515,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { return nil } first = false + ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) data := ec._Mutation(ctx, rc.Operation.SelectionSet) var buf bytes.Buffer data.MarshalGQL(&buf) @@ -524,7 +530,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { var buf bytes.Buffer return func(ctx context.Context) *graphql.Response { buf.Reset() - data := next() + data := next(ctx) if data == nil { return nil @@ -561,7 +567,7 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er } var sources = []*ast.Source{ - {Name: "pb/options.graphql", Input: `directive @Data_Oneof on INPUT_FIELD_DEFINITION + {Name: "../../pb/options.graphql", Input: `directive @Data_Oneof on INPUT_FIELD_DEFINITION directive @Query on FIELD_DEFINITION directive @Service on FIELD_DEFINITION directive @Test on FIELD_DEFINITION @@ -734,7 +740,7 @@ func (ec *executionContext) field_Mutation_name_args(ctx context.Context, rawArg var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -749,7 +755,7 @@ func (ec *executionContext) field_Mutation_newName0_args(ctx context.Context, ra var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -764,7 +770,7 @@ func (ec *executionContext) field_Mutation_newName_args(ctx context.Context, raw var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -779,7 +785,7 @@ func (ec *executionContext) field_Mutation_queryMutate1_args(ctx context.Context var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -794,7 +800,7 @@ func (ec *executionContext) field_Mutation_serviceInvalidSubscribe3_args(ctx con var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -809,7 +815,7 @@ func (ec *executionContext) field_Mutation_serviceMutate1_args(ctx context.Conte var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -824,7 +830,7 @@ func (ec *executionContext) field_Mutation_serviceMutate2_args(ctx context.Conte var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -839,7 +845,7 @@ func (ec *executionContext) field_Mutation_servicePubSub1_args(ctx context.Conte var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -854,7 +860,7 @@ func (ec *executionContext) field_Mutation_servicePubSub2_args(ctx context.Conte var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -869,7 +875,7 @@ func (ec *executionContext) field_Mutation_servicePublish_args(ctx context.Conte var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -899,7 +905,7 @@ func (ec *executionContext) field_Query_queryQuery1_args(ctx context.Context, ra var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -914,7 +920,7 @@ func (ec *executionContext) field_Query_queryQuery2_args(ctx context.Context, ra var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -929,7 +935,7 @@ func (ec *executionContext) field_Query_serviceInvalidSubscribe1_args(ctx contex var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -944,7 +950,7 @@ func (ec *executionContext) field_Query_serviceQuery1_args(ctx context.Context, var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -959,7 +965,7 @@ func (ec *executionContext) field_Subscription_querySubscribe_args(ctx context.C var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -974,7 +980,7 @@ func (ec *executionContext) field_Subscription_serviceInvalidSubscribe2_args(ctx var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -989,7 +995,7 @@ func (ec *executionContext) field_Subscription_serviceInvalidSubscribe3_args(ctx var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -1004,7 +1010,7 @@ func (ec *executionContext) field_Subscription_servicePubSub1_args(ctx context.C var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -1019,7 +1025,7 @@ func (ec *executionContext) field_Subscription_servicePubSub2_args(ctx context.C var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -1034,7 +1040,7 @@ func (ec *executionContext) field_Subscription_serviceSubscribe_args(ctx context var arg0 *pb.Data if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) if err != nil { return nil, err } @@ -1082,21 +1088,17 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region **************************** field.gotpl ***************************** func (ec *executionContext) _Data_stringX(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_stringX(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Data", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.StringX, nil @@ -1116,22 +1118,31 @@ func (ec *executionContext) _Data_stringX(ctx context.Context, field graphql.Col return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Data_foo(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Data_stringX(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Data", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Data_foo(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_foo(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Foo, nil @@ -1148,25 +1159,38 @@ func (ec *executionContext) _Data_foo(ctx context.Context, field graphql.Collect } res := resTmp.(*pb.Foo2) fc.Result = res - return ec.marshalNFoo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo2(ctx, field.Selections, res) + return ec.marshalNFoo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo2(ctx, field.Selections, res) } -func (ec *executionContext) _Data_double(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Data_foo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Data", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "param1": + return ec.fieldContext_Foo2_param1(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Foo2", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Data_double(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_double(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Double, nil @@ -1186,22 +1210,31 @@ func (ec *executionContext) _Data_double(ctx context.Context, field graphql.Coll return ec.marshalNFloat2ᚕfloat64ᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Data_string2(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Data_double(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Data", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Data_string2(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_string2(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.String2, nil @@ -1218,22 +1251,31 @@ func (ec *executionContext) _Data_string2(ctx context.Context, field graphql.Col return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Data_foo2(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Data_string2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Data", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Data_foo2(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_foo2(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Foo2, nil @@ -1247,25 +1289,38 @@ func (ec *executionContext) _Data_foo2(ctx context.Context, field graphql.Collec } res := resTmp.(*pb.Foo2) fc.Result = res - return ec.marshalOFoo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo2(ctx, field.Selections, res) + return ec.marshalOFoo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo2(ctx, field.Selections, res) } -func (ec *executionContext) _Data_double2(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Data_foo2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Data", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "param1": + return ec.fieldContext_Foo2_param1(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Foo2", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Data_double2(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_double2(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Double2, nil @@ -1282,22 +1337,31 @@ func (ec *executionContext) _Data_double2(ctx context.Context, field graphql.Col return ec.marshalOFloat2ᚕfloat64ᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Data_bars(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Data_double2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Data", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Data_bars(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_bars(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Bar, nil @@ -1314,22 +1378,31 @@ func (ec *executionContext) _Data_bars(ctx context.Context, field graphql.Collec return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Data_str(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Data_bars(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Data", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Data_str(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_str(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.String_, nil @@ -1346,22 +1419,31 @@ func (ec *executionContext) _Data_str(ctx context.Context, field graphql.Collect return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Data_str(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Data", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Data_Oneof3(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_Oneof3(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Data", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: true, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Data().Oneof3(rctx, obj) @@ -1375,25 +1457,34 @@ func (ec *executionContext) _Data_Oneof3(ctx context.Context, field graphql.Coll } res := resTmp.(pb.Data_Oneof) fc.Result = res - return ec.marshalOData_Oneof2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData_Oneof(ctx, field.Selections, res) + return ec.marshalOData_Oneof2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData_Oneof(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Data_Oneof3(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Data", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Data_Oneof does not have child fields") + }, + } + return fc, nil } func (ec *executionContext) _Data_Param1_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Data_Param1) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_Param1_param1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Data_Param1", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param1, nil @@ -1410,22 +1501,31 @@ func (ec *executionContext) _Data_Param1_param1(ctx context.Context, field graph return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Data_Param1_param1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Data_Param1", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Data_Param2_param2(ctx context.Context, field graphql.CollectedField, obj *pb.Data_Param2) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_Param2_param2(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Data_Param2", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param2, nil @@ -1442,22 +1542,31 @@ func (ec *executionContext) _Data_Param2_param2(ctx context.Context, field graph return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Data_Param2_param2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Data_Param2", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Foo2_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Foo2) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Foo2_param1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Foo2", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param1, nil @@ -1474,33 +1583,35 @@ func (ec *executionContext) _Foo2_param1(ctx context.Context, field graphql.Coll return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Foo2_param1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Foo2", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Mutation_serviceMutate1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_serviceMutate1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: true, - } - - ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_serviceMutate1_args(ctx, rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().ServiceMutate1(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Mutation().ServiceMutate1(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Service == nil { @@ -1519,7 +1630,7 @@ func (ec *executionContext) _Mutation_serviceMutate1(ctx context.Context, field if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -1530,37 +1641,70 @@ func (ec *executionContext) _Mutation_serviceMutate1(ctx context.Context, field } res := resTmp.(*pb.Data) fc.Result = res - return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_serviceMutate2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_serviceMutate1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_serviceMutate2_args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Mutation_serviceMutate1_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_serviceMutate2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_serviceMutate2(ctx, field) + if err != nil { return graphql.Null } - fc.Args = args - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - directive0 := func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().ServiceMutate2(rctx, args["in"].(*pb.Data)) - } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ServiceMutate2(rctx, fc.Args["in"].(*pb.Data)) + } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Service == nil { return nil, errors.New("directive Service is not implemented") @@ -1578,7 +1722,7 @@ func (ec *executionContext) _Mutation_serviceMutate2(ctx context.Context, field if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -1589,36 +1733,69 @@ func (ec *executionContext) _Mutation_serviceMutate2(ctx context.Context, field } res := resTmp.(*pb.Data) fc.Result = res - return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_servicePublish(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_serviceMutate2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_servicePublish_args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Mutation_serviceMutate2_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_servicePublish(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_servicePublish(ctx, field) + if err != nil { return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().ServicePublish(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Mutation().ServicePublish(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Service == nil { @@ -1637,7 +1814,7 @@ func (ec *executionContext) _Mutation_servicePublish(ctx context.Context, field if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -1648,36 +1825,69 @@ func (ec *executionContext) _Mutation_servicePublish(ctx context.Context, field } res := resTmp.(*pb.Data) fc.Result = res - return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_servicePubSub1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_servicePublish(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_servicePubSub1_args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Mutation_servicePublish_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_servicePubSub1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_servicePubSub1(ctx, field) + if err != nil { return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().ServicePubSub1(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Mutation().ServicePubSub1(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Service == nil { @@ -1696,7 +1906,7 @@ func (ec *executionContext) _Mutation_servicePubSub1(ctx context.Context, field if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -1707,36 +1917,69 @@ func (ec *executionContext) _Mutation_servicePubSub1(ctx context.Context, field } res := resTmp.(*pb.Data) fc.Result = res - return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_serviceInvalidSubscribe3(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_servicePubSub1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_serviceInvalidSubscribe3_args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Mutation_servicePubSub1_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_serviceInvalidSubscribe3(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_serviceInvalidSubscribe3(ctx, field) + if err != nil { return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().ServiceInvalidSubscribe3(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Mutation().ServiceInvalidSubscribe3(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Service == nil { @@ -1755,7 +1998,7 @@ func (ec *executionContext) _Mutation_serviceInvalidSubscribe3(ctx context.Conte if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -1766,36 +2009,69 @@ func (ec *executionContext) _Mutation_serviceInvalidSubscribe3(ctx context.Conte } res := resTmp.(*pb.Data) fc.Result = res - return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_servicePubSub2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_serviceInvalidSubscribe3(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_servicePubSub2_args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Mutation_serviceInvalidSubscribe3_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_servicePubSub2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_servicePubSub2(ctx, field) + if err != nil { return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().ServicePubSub2(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Mutation().ServicePubSub2(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Service == nil { @@ -1814,7 +2090,7 @@ func (ec *executionContext) _Mutation_servicePubSub2(ctx context.Context, field if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -1825,36 +2101,69 @@ func (ec *executionContext) _Mutation_servicePubSub2(ctx context.Context, field } res := resTmp.(*pb.Data) fc.Result = res - return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_newName(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_servicePubSub2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_newName_args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Mutation_servicePubSub2_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_newName(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_newName(ctx, field) + if err != nil { return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().NewName(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Mutation().NewName(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Service == nil { @@ -1873,7 +2182,7 @@ func (ec *executionContext) _Mutation_newName(ctx context.Context, field graphql if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -1884,36 +2193,69 @@ func (ec *executionContext) _Mutation_newName(ctx context.Context, field graphql } res := resTmp.(*pb.Data) fc.Result = res - return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_name(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_newName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_name_args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Mutation_newName_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_name(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_name(ctx, field) + if err != nil { return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().Name(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Mutation().Name(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Test == nil { @@ -1932,7 +2274,7 @@ func (ec *executionContext) _Mutation_name(ctx context.Context, field graphql.Co if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -1943,36 +2285,69 @@ func (ec *executionContext) _Mutation_name(ctx context.Context, field graphql.Co } res := resTmp.(*pb.Data) fc.Result = res - return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_newName0(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_newName0_args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Mutation_name_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_newName0(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_newName0(ctx, field) + if err != nil { return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().NewName0(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Mutation().NewName0(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Test == nil { @@ -1991,7 +2366,7 @@ func (ec *executionContext) _Mutation_newName0(ctx context.Context, field graphq if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2002,36 +2377,69 @@ func (ec *executionContext) _Mutation_newName0(ctx context.Context, field graphq } res := resTmp.(*pb.Data) fc.Result = res - return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_queryMutate1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_newName0(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_queryMutate1_args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Mutation_newName0_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_queryMutate1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_queryMutate1(ctx, field) + if err != nil { return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().QueryMutate1(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Mutation().QueryMutate1(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Query == nil { @@ -2050,7 +2458,7 @@ func (ec *executionContext) _Mutation_queryMutate1(ctx context.Context, field gr if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2061,36 +2469,69 @@ func (ec *executionContext) _Mutation_queryMutate1(ctx context.Context, field gr } res := resTmp.(*pb.Data) fc.Result = res - return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) } -func (ec *executionContext) _Query_serviceQuery1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { +func (ec *executionContext) fieldContext_Mutation_queryMutate1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } defer func() { if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null + err = ec.Recover(ctx, r) + ec.Error(ctx, err) } }() - fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: true, + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_queryMutate1_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return } + return fc, nil +} - ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Query_serviceQuery1_args(ctx, rawArgs) +func (ec *executionContext) _Query_serviceQuery1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_serviceQuery1(ctx, field) if err != nil { - ec.Error(ctx, err) return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().ServiceQuery1(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Query().ServiceQuery1(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Service == nil { @@ -2109,7 +2550,7 @@ func (ec *executionContext) _Query_serviceQuery1(ctx context.Context, field grap if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2120,36 +2561,69 @@ func (ec *executionContext) _Query_serviceQuery1(ctx context.Context, field grap } res := resTmp.(*pb.Data) fc.Result = res - return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) } -func (ec *executionContext) _Query_serviceInvalidSubscribe1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Query_serviceQuery1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Query", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - - ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Query_serviceInvalidSubscribe1_args(ctx, rawArgs) - if err != nil { + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_serviceQuery1_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_serviceInvalidSubscribe1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_serviceInvalidSubscribe1(ctx, field) + if err != nil { return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().ServiceInvalidSubscribe1(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Query().ServiceInvalidSubscribe1(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Service == nil { @@ -2168,7 +2642,7 @@ func (ec *executionContext) _Query_serviceInvalidSubscribe1(ctx context.Context, if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2179,36 +2653,69 @@ func (ec *executionContext) _Query_serviceInvalidSubscribe1(ctx context.Context, } res := resTmp.(*pb.Data) fc.Result = res - return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) } -func (ec *executionContext) _Query_queryQuery1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Query_serviceInvalidSubscribe1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Query", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Query_queryQuery1_args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Query_serviceInvalidSubscribe1_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_queryQuery1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_queryQuery1(ctx, field) + if err != nil { return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().QueryQuery1(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Query().QueryQuery1(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Query == nil { @@ -2227,7 +2734,7 @@ func (ec *executionContext) _Query_queryQuery1(ctx context.Context, field graphq if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2238,36 +2745,69 @@ func (ec *executionContext) _Query_queryQuery1(ctx context.Context, field graphq } res := resTmp.(*pb.Data) fc.Result = res - return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) } -func (ec *executionContext) _Query_queryQuery2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Query_queryQuery1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Query", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Query_queryQuery2_args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Query_queryQuery1_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_queryQuery2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_queryQuery2(ctx, field) + if err != nil { return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().QueryQuery2(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Query().QueryQuery2(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Query == nil { @@ -2286,7 +2826,7 @@ func (ec *executionContext) _Query_queryQuery2(ctx context.Context, field graphq if data, ok := tmp.(*pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2297,35 +2837,68 @@ func (ec *executionContext) _Query_queryQuery2(ctx context.Context, field graphq } res := resTmp.(*pb.Data) fc.Result = res - return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) } -func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { +func (ec *executionContext) fieldContext_Query_queryQuery2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } defer func() { if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null + err = ec.Recover(ctx, r) + ec.Error(ctx, err) } }() - fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_queryQuery2_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return } + return fc, nil +} - ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Query___type_args(ctx, rawArgs) +func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query___type(ctx, field) if err != nil { - ec.Error(ctx, err) return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.introspectType(args["name"].(string)) + return ec.introspectType(fc.Args["name"].(string)) }) if err != nil { ec.Error(ctx, err) @@ -2339,22 +2912,64 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Query", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return } + return fc, nil +} +func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query___schema(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectSchema() @@ -2371,33 +2986,49 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } -func (ec *executionContext) _Subscription_serviceSubscribe(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - fc := &graphql.FieldContext{ - Object: "Subscription", +func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", Field: field, - Args: nil, IsMethod: true, - IsResolver: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "description": + return ec.fieldContext___Schema_description(ctx, field) + case "types": + return ec.fieldContext___Schema_types(ctx, field) + case "queryType": + return ec.fieldContext___Schema_queryType(ctx, field) + case "mutationType": + return ec.fieldContext___Schema_mutationType(ctx, field) + case "subscriptionType": + return ec.fieldContext___Schema_subscriptionType(ctx, field) + case "directives": + return ec.fieldContext___Schema_directives(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) + }, } + return fc, nil +} - ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Subscription_serviceSubscribe_args(ctx, rawArgs) +func (ec *executionContext) _Subscription_serviceSubscribe(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_serviceSubscribe(ctx, field) if err != nil { - ec.Error(ctx, err) return nil } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().ServiceSubscribe(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Subscription().ServiceSubscribe(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Service == nil { @@ -2416,7 +3047,7 @@ func (ec *executionContext) _Subscription_serviceSubscribe(ctx context.Context, if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2425,48 +3056,85 @@ func (ec *executionContext) _Subscription_serviceSubscribe(ctx context.Context, if resTmp == nil { return nil } - return func() graphql.Marshaler { - res, ok := <-resTmp.(<-chan *pb.Data) - if !ok { + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan *pb.Data): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): return nil } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) } } -func (ec *executionContext) _Subscription_servicePubSub1(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Subscription_serviceSubscribe(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Subscription", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Subscription_servicePubSub1_args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Subscription_serviceSubscribe_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_servicePubSub1(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_servicePubSub1(ctx, field) + if err != nil { return nil } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().ServicePubSub1(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Subscription().ServicePubSub1(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Service == nil { @@ -2485,7 +3153,7 @@ func (ec *executionContext) _Subscription_servicePubSub1(ctx context.Context, fi if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2494,48 +3162,85 @@ func (ec *executionContext) _Subscription_servicePubSub1(ctx context.Context, fi if resTmp == nil { return nil } - return func() graphql.Marshaler { - res, ok := <-resTmp.(<-chan *pb.Data) - if !ok { + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan *pb.Data): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): return nil } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) } } -func (ec *executionContext) _Subscription_serviceInvalidSubscribe2(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Subscription_servicePubSub1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Subscription", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Subscription_serviceInvalidSubscribe2_args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Subscription_servicePubSub1_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_serviceInvalidSubscribe2(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_serviceInvalidSubscribe2(ctx, field) + if err != nil { return nil } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().ServiceInvalidSubscribe2(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Subscription().ServiceInvalidSubscribe2(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Service == nil { @@ -2554,7 +3259,7 @@ func (ec *executionContext) _Subscription_serviceInvalidSubscribe2(ctx context.C if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2563,48 +3268,85 @@ func (ec *executionContext) _Subscription_serviceInvalidSubscribe2(ctx context.C if resTmp == nil { return nil } - return func() graphql.Marshaler { - res, ok := <-resTmp.(<-chan *pb.Data) - if !ok { + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan *pb.Data): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): return nil } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) } } -func (ec *executionContext) _Subscription_serviceInvalidSubscribe3(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Subscription_serviceInvalidSubscribe2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Subscription", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Subscription_serviceInvalidSubscribe3_args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Subscription_serviceInvalidSubscribe2_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_serviceInvalidSubscribe3(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_serviceInvalidSubscribe3(ctx, field) + if err != nil { return nil } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().ServiceInvalidSubscribe3(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Subscription().ServiceInvalidSubscribe3(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Service == nil { @@ -2623,7 +3365,7 @@ func (ec *executionContext) _Subscription_serviceInvalidSubscribe3(ctx context.C if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2632,50 +3374,87 @@ func (ec *executionContext) _Subscription_serviceInvalidSubscribe3(ctx context.C if resTmp == nil { return nil } - return func() graphql.Marshaler { - res, ok := <-resTmp.(<-chan *pb.Data) - if !ok { + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan *pb.Data): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): return nil } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) } } -func (ec *executionContext) _Subscription_servicePubSub2(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Subscription_serviceInvalidSubscribe3(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Subscription", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Subscription_servicePubSub2_args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Subscription_serviceInvalidSubscribe3_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_servicePubSub2(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_servicePubSub2(ctx, field) + if err != nil { return nil } - fc.Args = args - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - directive0 := func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().ServicePubSub2(rctx, args["in"].(*pb.Data)) - } - directive1 := func(ctx context.Context) (interface{}, error) { + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().ServicePubSub2(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Service == nil { return nil, errors.New("directive Service is not implemented") } @@ -2692,7 +3471,7 @@ func (ec *executionContext) _Subscription_servicePubSub2(ctx context.Context, fi if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2701,48 +3480,85 @@ func (ec *executionContext) _Subscription_servicePubSub2(ctx context.Context, fi if resTmp == nil { return nil } - return func() graphql.Marshaler { - res, ok := <-resTmp.(<-chan *pb.Data) - if !ok { + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan *pb.Data): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): return nil } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) } } -func (ec *executionContext) _Subscription_querySubscribe(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Subscription_servicePubSub2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Subscription", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Subscription_querySubscribe_args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Subscription_servicePubSub2_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_querySubscribe(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_querySubscribe(ctx, field) + if err != nil { return nil } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Subscription().QuerySubscribe(rctx, args["in"].(*pb.Data)) + return ec.resolvers.Subscription().QuerySubscribe(rctx, fc.Args["in"].(*pb.Data)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Query == nil { @@ -2761,7 +3577,7 @@ func (ec *executionContext) _Subscription_querySubscribe(ctx context.Context, fi if data, ok := tmp.(<-chan *pb.Data); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -2770,37 +3586,81 @@ func (ec *executionContext) _Subscription_querySubscribe(ctx context.Context, fi if resTmp == nil { return nil } - return func() graphql.Marshaler { - res, ok := <-resTmp.(<-chan *pb.Data) - if !ok { + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan *pb.Data): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): return nil } - return graphql.WriterFunc(func(w io.Writer) { - w.Write([]byte{'{'}) - graphql.MarshalString(field.Alias).MarshalGQL(w) - w.Write([]byte{':'}) - ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) - w.Write([]byte{'}'}) - }) } } -func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { +func (ec *executionContext) fieldContext_Subscription_querySubscribe(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } defer func() { if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null + err = ec.Recover(ctx, r) + ec.Error(ctx, err) } }() - fc := &graphql.FieldContext{ - Object: "__Directive", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_querySubscribe_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return } + return fc, nil +} +func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_name(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -2820,25 +3680,34 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Directive", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_description(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description, nil + return obj.Description(), nil }) if err != nil { ec.Error(ctx, err) @@ -2847,27 +3716,36 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_locations(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__Directive", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Locations, nil @@ -2887,22 +3765,31 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Directive", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type __DirectiveLocation does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_args(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -2922,22 +3809,85 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { +func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__EnumValue", + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsRepeatable, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_name(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -2957,25 +3907,34 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_description(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description, nil + return obj.Description(), nil }) if err != nil { ec.Error(ctx, err) @@ -2984,27 +3943,36 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -3024,22 +3992,31 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -3056,22 +4033,31 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -3091,25 +4077,34 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Field", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_description(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description, nil + return obj.Description(), nil }) if err != nil { ec.Error(ctx, err) @@ -3118,27 +4113,36 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_args(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -3158,22 +4162,41 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Field", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_type(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -3193,22 +4216,53 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_isDeprecated(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -3228,22 +4282,31 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Field", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_deprecationReason(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -3260,22 +4323,31 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__InputValue", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -3295,25 +4367,34 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_description(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description, nil + return obj.Description(), nil }) if err != nil { ec.Error(ctx, err) @@ -3322,27 +4403,36 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__InputValue", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -3362,22 +4452,53 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DefaultValue, nil @@ -3394,22 +4515,72 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { +func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Schema", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_types(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil @@ -3429,22 +4600,53 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Schema", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_queryType(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.QueryType(), nil @@ -3464,22 +4666,53 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Schema", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_mutationType(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.MutationType(), nil @@ -3496,22 +4729,53 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Schema", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubscriptionType(), nil @@ -3528,22 +4792,53 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Schema", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_directives(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Directives(), nil @@ -3563,22 +4858,43 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___Directive_name(ctx, field) + case "description": + return ec.fieldContext___Directive_description(ctx, field) + case "locations": + return ec.fieldContext___Directive_locations(ctx, field) + case "args": + return ec.fieldContext___Directive_args(ctx, field) + case "isRepeatable": + return ec.fieldContext___Directive_isRepeatable(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_kind(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Kind(), nil @@ -3598,22 +4914,31 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Type", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type __TypeKind does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_name(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name(), nil @@ -3630,22 +4955,31 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Type", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_description(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description(), nil @@ -3657,37 +4991,39 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Type", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} - ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field___Type_fields_args(ctx, rawArgs) +func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_fields(ctx, field) if err != nil { - ec.Error(ctx, err) return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Fields(args["includeDeprecated"].(bool)), nil + return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil }) if err != nil { ec.Error(ctx, err) @@ -3701,22 +5037,56 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Type", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___Field_name(ctx, field) + case "description": + return ec.fieldContext___Field_description(ctx, field) + case "args": + return ec.fieldContext___Field_args(ctx, field) + case "type": + return ec.fieldContext___Field_type(ctx, field) + case "isDeprecated": + return ec.fieldContext___Field_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___Field_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name) + }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} +func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_interfaces(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Interfaces(), nil @@ -3733,22 +5103,53 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Type", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_possibleTypes(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PossibleTypes(), nil @@ -3765,32 +5166,56 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Type", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, } + return fc, nil +} - ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field___Type_enumValues_args(ctx, rawArgs) +func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_enumValues(ctx, field) if err != nil { - ec.Error(ctx, err) return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EnumValues(args["includeDeprecated"].(bool)), nil + return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil }) if err != nil { ec.Error(ctx, err) @@ -3804,22 +5229,52 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Type", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___EnumValue_name(ctx, field) + case "description": + return ec.fieldContext___EnumValue_description(ctx, field) + case "isDeprecated": + return ec.fieldContext___EnumValue_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___EnumValue_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return } + return fc, nil +} +func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_inputFields(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InputFields(), nil @@ -3836,25 +5291,107 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_ofType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.OfType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Type", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.OfType(), nil + return obj.SpecifiedByURL(), nil }) if err != nil { ec.Error(ctx, err) @@ -3863,9 +5400,22 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co if resTmp == nil { return graphql.Null } - res := resTmp.(*introspection.Type) + res := resTmp.(*string) fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil } // endregion **************************** field.gotpl ***************************** @@ -3874,9 +5424,17 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co func (ec *executionContext) unmarshalInputDataInput(ctx context.Context, obj interface{}) (pb.Data, error) { var it pb.Data - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"stringX", "foo", "double", "string2", "foo2", "double2", "bars", "str", "param1", "param2"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "stringX": var err error @@ -3890,7 +5448,7 @@ func (ec *executionContext) unmarshalInputDataInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("foo")) - it.Foo, err = ec.unmarshalNFoo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo2(ctx, v) + it.Foo, err = ec.unmarshalNFoo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo2(ctx, v) if err != nil { return it, err } @@ -3914,7 +5472,7 @@ func (ec *executionContext) unmarshalInputDataInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("foo2")) - it.Foo2, err = ec.unmarshalOFoo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo2(ctx, v) + it.Foo2, err = ec.unmarshalOFoo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo2(ctx, v) if err != nil { return it, err } @@ -3998,9 +5556,17 @@ func (ec *executionContext) unmarshalInputDataInput(ctx context.Context, obj int func (ec *executionContext) unmarshalInputFoo2Input(ctx context.Context, obj interface{}) (pb.Foo2, error) { var it pb.Foo2 - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"param1"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "param1": var err error @@ -4051,7 +5617,6 @@ var dataImplementors = []string{"Data"} func (ec *executionContext) _Data(ctx context.Context, sel ast.SelectionSet, obj *pb.Data) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, dataImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -4059,33 +5624,50 @@ func (ec *executionContext) _Data(ctx context.Context, sel ast.SelectionSet, obj case "__typename": out.Values[i] = graphql.MarshalString("Data") case "stringX": + out.Values[i] = ec._Data_stringX(ctx, field, obj) + if out.Values[i] == graphql.Null { atomic.AddUint32(&invalids, 1) } case "foo": + out.Values[i] = ec._Data_foo(ctx, field, obj) + if out.Values[i] == graphql.Null { atomic.AddUint32(&invalids, 1) } case "double": + out.Values[i] = ec._Data_double(ctx, field, obj) + if out.Values[i] == graphql.Null { atomic.AddUint32(&invalids, 1) } case "string2": + out.Values[i] = ec._Data_string2(ctx, field, obj) + case "foo2": + out.Values[i] = ec._Data_foo2(ctx, field, obj) + case "double2": + out.Values[i] = ec._Data_double2(ctx, field, obj) + case "bars": + out.Values[i] = ec._Data_bars(ctx, field, obj) + case "str": + out.Values[i] = ec._Data_str(ctx, field, obj) + case "Oneof3": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -4093,6 +5675,11 @@ func (ec *executionContext) _Data(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Data_Oneof3(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) default: panic("unknown field " + strconv.Quote(field.Name)) @@ -4109,7 +5696,6 @@ var data_Param1Implementors = []string{"Data_Param1", "Data_Oneof"} func (ec *executionContext) _Data_Param1(ctx context.Context, sel ast.SelectionSet, obj *pb.Data_Param1) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, data_Param1Implementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -4117,7 +5703,9 @@ func (ec *executionContext) _Data_Param1(ctx context.Context, sel ast.SelectionS case "__typename": out.Values[i] = graphql.MarshalString("Data_Param1") case "param1": + out.Values[i] = ec._Data_Param1_param1(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -4133,7 +5721,6 @@ var data_Param2Implementors = []string{"Data_Param2", "Data_Oneof"} func (ec *executionContext) _Data_Param2(ctx context.Context, sel ast.SelectionSet, obj *pb.Data_Param2) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, data_Param2Implementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -4141,7 +5728,9 @@ func (ec *executionContext) _Data_Param2(ctx context.Context, sel ast.SelectionS case "__typename": out.Values[i] = graphql.MarshalString("Data_Param2") case "param2": + out.Values[i] = ec._Data_Param2_param2(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -4157,7 +5746,6 @@ var foo2Implementors = []string{"Foo2"} func (ec *executionContext) _Foo2(ctx context.Context, sel ast.SelectionSet, obj *pb.Foo2) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, foo2Implementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -4165,7 +5753,9 @@ func (ec *executionContext) _Foo2(ctx context.Context, sel ast.SelectionSet, obj case "__typename": out.Values[i] = graphql.MarshalString("Foo2") case "param1": + out.Values[i] = ec._Foo2_param1(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -4181,7 +5771,6 @@ var mutationImplementors = []string{"Mutation"} func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) - ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Mutation", }) @@ -4189,29 +5778,74 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { + innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ + Object: field.Name, + Field: field, + }) + switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("Mutation") case "serviceMutate1": - out.Values[i] = ec._Mutation_serviceMutate1(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_serviceMutate1(ctx, field) + }) + case "serviceMutate2": - out.Values[i] = ec._Mutation_serviceMutate2(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_serviceMutate2(ctx, field) + }) + case "servicePublish": - out.Values[i] = ec._Mutation_servicePublish(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_servicePublish(ctx, field) + }) + case "servicePubSub1": - out.Values[i] = ec._Mutation_servicePubSub1(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_servicePubSub1(ctx, field) + }) + case "serviceInvalidSubscribe3": - out.Values[i] = ec._Mutation_serviceInvalidSubscribe3(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_serviceInvalidSubscribe3(ctx, field) + }) + case "servicePubSub2": - out.Values[i] = ec._Mutation_servicePubSub2(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_servicePubSub2(ctx, field) + }) + case "newName": - out.Values[i] = ec._Mutation_newName(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_newName(ctx, field) + }) + case "name": - out.Values[i] = ec._Mutation_name(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_name(ctx, field) + }) + case "newName0": - out.Values[i] = ec._Mutation_newName0(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_newName0(ctx, field) + }) + case "queryMutate1": - out.Values[i] = ec._Mutation_queryMutate1(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_queryMutate1(ctx, field) + }) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -4227,7 +5861,6 @@ var queryImplementors = []string{"Query"} func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) - ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Query", }) @@ -4235,12 +5868,18 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { + innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ + Object: field.Name, + Field: field, + }) + switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("Query") case "serviceQuery1": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -4248,10 +5887,19 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_serviceQuery1(ctx, field) return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) }) case "serviceInvalidSubscribe1": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -4259,10 +5907,19 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_serviceInvalidSubscribe1(ctx, field) return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) }) case "queryQuery1": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -4270,10 +5927,19 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_queryQuery1(ctx, field) return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) }) case "queryQuery2": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -4281,11 +5947,27 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_queryQuery2(ctx, field) return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) }) case "__type": - out.Values[i] = ec._Query___type(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Query___type(ctx, field) + }) + case "__schema": - out.Values[i] = ec._Query___schema(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Query___schema(ctx, field) + }) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -4299,7 +5981,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr var subscriptionImplementors = []string{"Subscription"} -func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func() graphql.Marshaler { +func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func(ctx context.Context) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, subscriptionImplementors) ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Subscription", @@ -4331,7 +6013,6 @@ var __DirectiveImplementors = []string{"__Directive"} func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -4339,19 +6020,34 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS case "__typename": out.Values[i] = graphql.MarshalString("__Directive") case "name": + out.Values[i] = ec.___Directive_name(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "description": + out.Values[i] = ec.___Directive_description(ctx, field, obj) + case "locations": + out.Values[i] = ec.___Directive_locations(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "args": + out.Values[i] = ec.___Directive_args(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "isRepeatable": + + out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } @@ -4370,7 +6066,6 @@ var __EnumValueImplementors = []string{"__EnumValue"} func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -4378,19 +6073,27 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS case "__typename": out.Values[i] = graphql.MarshalString("__EnumValue") case "name": + out.Values[i] = ec.___EnumValue_name(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "description": + out.Values[i] = ec.___EnumValue_description(ctx, field, obj) + case "isDeprecated": + out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "deprecationReason": + out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -4406,7 +6109,6 @@ var __FieldImplementors = []string{"__Field"} func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -4414,29 +6116,41 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, case "__typename": out.Values[i] = graphql.MarshalString("__Field") case "name": + out.Values[i] = ec.___Field_name(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "description": + out.Values[i] = ec.___Field_description(ctx, field, obj) + case "args": + out.Values[i] = ec.___Field_args(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "type": + out.Values[i] = ec.___Field_type(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "isDeprecated": + out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "deprecationReason": + out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -4452,7 +6166,6 @@ var __InputValueImplementors = []string{"__InputValue"} func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -4460,19 +6173,27 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection case "__typename": out.Values[i] = graphql.MarshalString("__InputValue") case "name": + out.Values[i] = ec.___InputValue_name(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "description": + out.Values[i] = ec.___InputValue_description(ctx, field, obj) + case "type": + out.Values[i] = ec.___InputValue_type(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "defaultValue": + out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -4488,29 +6209,42 @@ var __SchemaImplementors = []string{"__Schema"} func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__Schema") + case "description": + + out.Values[i] = ec.___Schema_description(ctx, field, obj) + case "types": + out.Values[i] = ec.___Schema_types(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "queryType": + out.Values[i] = ec.___Schema_queryType(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "mutationType": + out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) + case "subscriptionType": + out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) + case "directives": + out.Values[i] = ec.___Schema_directives(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } @@ -4529,7 +6263,6 @@ var __TypeImplementors = []string{"__Type"} func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -4537,26 +6270,48 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o case "__typename": out.Values[i] = graphql.MarshalString("__Type") case "kind": + out.Values[i] = ec.___Type_kind(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "name": + out.Values[i] = ec.___Type_name(ctx, field, obj) + case "description": + out.Values[i] = ec.___Type_description(ctx, field, obj) + case "fields": + out.Values[i] = ec.___Type_fields(ctx, field, obj) + case "interfaces": + out.Values[i] = ec.___Type_interfaces(ctx, field, obj) + case "possibleTypes": + out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) + case "enumValues": + out.Values[i] = ec.___Type_enumValues(ctx, field, obj) + case "inputFields": + out.Values[i] = ec.___Type_inputFields(ctx, field, obj) + case "ofType": + out.Values[i] = ec.___Type_ofType(ctx, field, obj) + + case "specifiedByURL": + + out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -4581,35 +6336,31 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se res := graphql.MarshalBoolean(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res } func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v interface{}) (float64, error) { - res, err := graphql.UnmarshalFloat(v) + res, err := graphql.UnmarshalFloatContext(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { - res := graphql.MarshalFloat(v) + res := graphql.MarshalFloatContext(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } - return res + return graphql.WrapContextMarshaler(ctx, res) } func (ec *executionContext) unmarshalNFloat2ᚕfloat64ᚄ(ctx context.Context, v interface{}) ([]float64, error) { var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]float64, len(vSlice)) @@ -4629,20 +6380,26 @@ func (ec *executionContext) marshalNFloat2ᚕfloat64ᚄ(ctx context.Context, sel ret[i] = ec.marshalNFloat2float64(ctx, sel, v[i]) } + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) marshalNFoo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo2(ctx context.Context, sel ast.SelectionSet, v *pb.Foo2) graphql.Marshaler { +func (ec *executionContext) marshalNFoo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo2(ctx context.Context, sel ast.SelectionSet, v *pb.Foo2) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Foo2(ctx, sel, v) } -func (ec *executionContext) unmarshalNFoo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo2(ctx context.Context, v interface{}) (*pb.Foo2, error) { +func (ec *executionContext) unmarshalNFoo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo2(ctx context.Context, v interface{}) (*pb.Foo2, error) { res, err := ec.unmarshalInputFoo2Input(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } @@ -4656,7 +6413,7 @@ func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.S res := graphql.MarshalString(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -4700,6 +6457,13 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -4712,7 +6476,7 @@ func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Conte res := graphql.MarshalString(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -4721,11 +6485,7 @@ func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Conte func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]string, len(vSlice)) @@ -4773,6 +6533,13 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -4822,6 +6589,13 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -4863,13 +6637,20 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } @@ -4885,7 +6666,7 @@ func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel a res := graphql.MarshalString(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -4897,7 +6678,8 @@ func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interf } func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { - return graphql.MarshalBoolean(v) + res := graphql.MarshalBoolean(v) + return res } func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { @@ -4912,17 +6694,18 @@ func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast if v == nil { return graphql.Null } - return graphql.MarshalBoolean(*v) + res := graphql.MarshalBoolean(*v) + return res } -func (ec *executionContext) marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx context.Context, sel ast.SelectionSet, v *pb.Data) graphql.Marshaler { +func (ec *executionContext) marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx context.Context, sel ast.SelectionSet, v *pb.Data) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Data(ctx, sel, v) } -func (ec *executionContext) unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx context.Context, v interface{}) (*pb.Data, error) { +func (ec *executionContext) unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx context.Context, v interface{}) (*pb.Data, error) { if v == nil { return nil, nil } @@ -4930,7 +6713,7 @@ func (ec *executionContext) unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladco return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOData_Oneof2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData_Oneof(ctx context.Context, sel ast.SelectionSet, v pb.Data_Oneof) graphql.Marshaler { +func (ec *executionContext) marshalOData_Oneof2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData_Oneof(ctx context.Context, sel ast.SelectionSet, v pb.Data_Oneof) graphql.Marshaler { if v == nil { return graphql.Null } @@ -4943,11 +6726,7 @@ func (ec *executionContext) unmarshalOFloat2ᚕfloat64ᚄ(ctx context.Context, v } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]float64, len(vSlice)) @@ -4970,17 +6749,23 @@ func (ec *executionContext) marshalOFloat2ᚕfloat64ᚄ(ctx context.Context, sel ret[i] = ec.marshalNFloat2float64(ctx, sel, v[i]) } + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) marshalOFoo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo2(ctx context.Context, sel ast.SelectionSet, v *pb.Foo2) graphql.Marshaler { +func (ec *executionContext) marshalOFoo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo2(ctx context.Context, sel ast.SelectionSet, v *pb.Foo2) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Foo2(ctx, sel, v) } -func (ec *executionContext) unmarshalOFoo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo2(ctx context.Context, v interface{}) (*pb.Foo2, error) { +func (ec *executionContext) unmarshalOFoo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo2(ctx context.Context, v interface{}) (*pb.Foo2, error) { if v == nil { return nil, nil } @@ -4994,7 +6779,8 @@ func (ec *executionContext) unmarshalOString2string(ctx context.Context, v inter } func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { - return graphql.MarshalString(v) + res := graphql.MarshalString(v) + return res } func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { @@ -5009,7 +6795,8 @@ func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel as if v == nil { return graphql.Null } - return graphql.MarshalString(*v) + res := graphql.MarshalString(*v) + return res } func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { @@ -5049,6 +6836,13 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgq } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -5089,6 +6883,13 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgen } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -5129,6 +6930,13 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -5176,6 +6984,13 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } diff --git a/example/codegen/gqlgen-constructs.yaml b/example/codegen/api/gqlgen-constructs.yaml similarity index 83% rename from example/codegen/gqlgen-constructs.yaml rename to example/codegen/api/gqlgen-constructs.yaml index 16b7137..2f7c465 100644 --- a/example/codegen/gqlgen-constructs.yaml +++ b/example/codegen/api/gqlgen-constructs.yaml @@ -2,19 +2,19 @@ schema: - pb/constructs.graphql exec: - filename: gql/constructs/generated.go + filename: graphql/constructs/generated.go package: constructs model: - filename: gql/constructs/model.go + filename: graphql/constructs/model.go autobind: - - "github.com/danielvladco/go-proto-gql/example/codegen/pb" + - "github.com/danielvladco/go-proto-gql/example/codegen/api/pb" models: Pb_Any: model: - - github.com/danielvladco/go-proto-gql/example/codegen/pb.Any + - github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Any GoogleProtobuf_TimestampInput: model: - google.golang.org/protobuf/types/known/timestamppb.Timestamp diff --git a/example/codegen/api/gqlgen-options.yaml b/example/codegen/api/gqlgen-options.yaml new file mode 100644 index 0000000..158f8e6 --- /dev/null +++ b/example/codegen/api/gqlgen-options.yaml @@ -0,0 +1,12 @@ +schema: + - pb/options.graphql + +exec: + filename: graphql/options/generated.go + package: options + +model: + filename: graphql/constructs/model.go + +autobind: + - "github.com/danielvladco/go-proto-gql/example/codegen/api/pb" diff --git a/example/codegen/gql/constructs/generated.go b/example/codegen/api/graphql/constructs/generated.go similarity index 67% rename from example/codegen/gql/constructs/generated.go rename to example/codegen/api/graphql/constructs/generated.go index 5621194..7e54c78 100644 --- a/example/codegen/gql/constructs/generated.go +++ b/example/codegen/api/graphql/constructs/generated.go @@ -12,7 +12,7 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/danielvladco/go-proto-gql/example/codegen/pb" + "github.com/danielvladco/go-proto-gql/example/codegen/api/pb" "github.com/danielvladco/go-proto-gql/pkg/types" gqlparser "github.com/vektah/gqlparser/v2" "github.com/vektah/gqlparser/v2/ast" @@ -63,11 +63,11 @@ type ComplexityRoot struct { Param2 func(childComplexity int) int } - FooFoo2 struct { + Foo_Foo2 struct { Param1 func(childComplexity int) int } - GoogleProtobufTimestamp struct { + GoogleProtobuf_Timestamp struct { Nanos func(childComplexity int) int Seconds func(childComplexity int) int } @@ -92,87 +92,87 @@ type ComplexityRoot struct { Uint64Uint64 func(childComplexity int) int } - MapsBoolBoolEntry struct { + Maps_BoolBoolEntry struct { Key func(childComplexity int) int Value func(childComplexity int) int } - MapsFixed32Fixed32Entry struct { + Maps_Fixed32Fixed32Entry struct { Key func(childComplexity int) int Value func(childComplexity int) int } - MapsFixed64Fixed64Entry struct { + Maps_Fixed64Fixed64Entry struct { Key func(childComplexity int) int Value func(childComplexity int) int } - MapsInt32Int32Entry struct { + Maps_Int32Int32Entry struct { Key func(childComplexity int) int Value func(childComplexity int) int } - MapsInt64Int64Entry struct { + Maps_Int64Int64Entry struct { Key func(childComplexity int) int Value func(childComplexity int) int } - MapsSfixed32Sfixed32Entry struct { + Maps_Sfixed32Sfixed32Entry struct { Key func(childComplexity int) int Value func(childComplexity int) int } - MapsSfixed64Sfixed64Entry struct { + Maps_Sfixed64Sfixed64Entry struct { Key func(childComplexity int) int Value func(childComplexity int) int } - MapsSint32Sint32Entry struct { + Maps_Sint32Sint32Entry struct { Key func(childComplexity int) int Value func(childComplexity int) int } - MapsSint64Sint64Entry struct { + Maps_Sint64Sint64Entry struct { Key func(childComplexity int) int Value func(childComplexity int) int } - MapsStringBarEntry struct { + Maps_StringBarEntry struct { Key func(childComplexity int) int Value func(childComplexity int) int } - MapsStringBytesEntry struct { + Maps_StringBytesEntry struct { Key func(childComplexity int) int Value func(childComplexity int) int } - MapsStringDoubleEntry struct { + Maps_StringDoubleEntry struct { Key func(childComplexity int) int Value func(childComplexity int) int } - MapsStringFloatEntry struct { + Maps_StringFloatEntry struct { Key func(childComplexity int) int Value func(childComplexity int) int } - MapsStringFooEntry struct { + Maps_StringFooEntry struct { Key func(childComplexity int) int Value func(childComplexity int) int } - MapsStringStringEntry struct { + Maps_StringStringEntry struct { Key func(childComplexity int) int Value func(childComplexity int) int } - MapsUint32Uint32Entry struct { + Maps_Uint32Uint32Entry struct { Key func(childComplexity int) int Value func(childComplexity int) int } - MapsUint64Uint64Entry struct { + Maps_Uint64Uint64Entry struct { Key func(childComplexity int) int Value func(childComplexity int) int } @@ -197,27 +197,27 @@ type ComplexityRoot struct { Param1 func(childComplexity int) int } - OneofParam2 struct { + Oneof_Param2 struct { Param2 func(childComplexity int) int } - OneofParam3 struct { + Oneof_Param3 struct { Param3 func(childComplexity int) int } - OneofParam4 struct { + Oneof_Param4 struct { Param4 func(childComplexity int) int } - OneofParam5 struct { + Oneof_Param5 struct { Param5 func(childComplexity int) int } - OneofParam6 struct { + Oneof_Param6 struct { Param6 func(childComplexity int) int } - PbAny struct { + Pb_Any struct { Param1 func(childComplexity int) int } @@ -239,11 +239,11 @@ type ComplexityRoot struct { LocalTime2 func(childComplexity int) int } - RefBar struct { + Ref_Bar struct { Param1 func(childComplexity int) int } - RefFoo struct { + Ref_Foo struct { Bar1 func(childComplexity int) int Bar2 func(childComplexity int) int En1 func(childComplexity int) int @@ -252,11 +252,11 @@ type ComplexityRoot struct { LocalTime2 func(childComplexity int) int } - RefFooBar struct { + Ref_Foo_Bar struct { Param1 func(childComplexity int) int } - RefFooBazGz struct { + Ref_Foo_Baz_Gz struct { Param1 func(childComplexity int) int } @@ -408,25 +408,25 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Foo.Param2(childComplexity), true case "Foo_Foo2.param1": - if e.complexity.FooFoo2.Param1 == nil { + if e.complexity.Foo_Foo2.Param1 == nil { break } - return e.complexity.FooFoo2.Param1(childComplexity), true + return e.complexity.Foo_Foo2.Param1(childComplexity), true case "GoogleProtobuf_Timestamp.nanos": - if e.complexity.GoogleProtobufTimestamp.Nanos == nil { + if e.complexity.GoogleProtobuf_Timestamp.Nanos == nil { break } - return e.complexity.GoogleProtobufTimestamp.Nanos(childComplexity), true + return e.complexity.GoogleProtobuf_Timestamp.Nanos(childComplexity), true case "GoogleProtobuf_Timestamp.seconds": - if e.complexity.GoogleProtobufTimestamp.Seconds == nil { + if e.complexity.GoogleProtobuf_Timestamp.Seconds == nil { break } - return e.complexity.GoogleProtobufTimestamp.Seconds(childComplexity), true + return e.complexity.GoogleProtobuf_Timestamp.Seconds(childComplexity), true case "Maps.boolBool": if e.complexity.Maps.BoolBool == nil { @@ -548,242 +548,242 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Maps.Uint64Uint64(childComplexity), true case "Maps_BoolBoolEntry.key": - if e.complexity.MapsBoolBoolEntry.Key == nil { + if e.complexity.Maps_BoolBoolEntry.Key == nil { break } - return e.complexity.MapsBoolBoolEntry.Key(childComplexity), true + return e.complexity.Maps_BoolBoolEntry.Key(childComplexity), true case "Maps_BoolBoolEntry.value": - if e.complexity.MapsBoolBoolEntry.Value == nil { + if e.complexity.Maps_BoolBoolEntry.Value == nil { break } - return e.complexity.MapsBoolBoolEntry.Value(childComplexity), true + return e.complexity.Maps_BoolBoolEntry.Value(childComplexity), true case "Maps_Fixed32Fixed32Entry.key": - if e.complexity.MapsFixed32Fixed32Entry.Key == nil { + if e.complexity.Maps_Fixed32Fixed32Entry.Key == nil { break } - return e.complexity.MapsFixed32Fixed32Entry.Key(childComplexity), true + return e.complexity.Maps_Fixed32Fixed32Entry.Key(childComplexity), true case "Maps_Fixed32Fixed32Entry.value": - if e.complexity.MapsFixed32Fixed32Entry.Value == nil { + if e.complexity.Maps_Fixed32Fixed32Entry.Value == nil { break } - return e.complexity.MapsFixed32Fixed32Entry.Value(childComplexity), true + return e.complexity.Maps_Fixed32Fixed32Entry.Value(childComplexity), true case "Maps_Fixed64Fixed64Entry.key": - if e.complexity.MapsFixed64Fixed64Entry.Key == nil { + if e.complexity.Maps_Fixed64Fixed64Entry.Key == nil { break } - return e.complexity.MapsFixed64Fixed64Entry.Key(childComplexity), true + return e.complexity.Maps_Fixed64Fixed64Entry.Key(childComplexity), true case "Maps_Fixed64Fixed64Entry.value": - if e.complexity.MapsFixed64Fixed64Entry.Value == nil { + if e.complexity.Maps_Fixed64Fixed64Entry.Value == nil { break } - return e.complexity.MapsFixed64Fixed64Entry.Value(childComplexity), true + return e.complexity.Maps_Fixed64Fixed64Entry.Value(childComplexity), true case "Maps_Int32Int32Entry.key": - if e.complexity.MapsInt32Int32Entry.Key == nil { + if e.complexity.Maps_Int32Int32Entry.Key == nil { break } - return e.complexity.MapsInt32Int32Entry.Key(childComplexity), true + return e.complexity.Maps_Int32Int32Entry.Key(childComplexity), true case "Maps_Int32Int32Entry.value": - if e.complexity.MapsInt32Int32Entry.Value == nil { + if e.complexity.Maps_Int32Int32Entry.Value == nil { break } - return e.complexity.MapsInt32Int32Entry.Value(childComplexity), true + return e.complexity.Maps_Int32Int32Entry.Value(childComplexity), true case "Maps_Int64Int64Entry.key": - if e.complexity.MapsInt64Int64Entry.Key == nil { + if e.complexity.Maps_Int64Int64Entry.Key == nil { break } - return e.complexity.MapsInt64Int64Entry.Key(childComplexity), true + return e.complexity.Maps_Int64Int64Entry.Key(childComplexity), true case "Maps_Int64Int64Entry.value": - if e.complexity.MapsInt64Int64Entry.Value == nil { + if e.complexity.Maps_Int64Int64Entry.Value == nil { break } - return e.complexity.MapsInt64Int64Entry.Value(childComplexity), true + return e.complexity.Maps_Int64Int64Entry.Value(childComplexity), true case "Maps_Sfixed32Sfixed32Entry.key": - if e.complexity.MapsSfixed32Sfixed32Entry.Key == nil { + if e.complexity.Maps_Sfixed32Sfixed32Entry.Key == nil { break } - return e.complexity.MapsSfixed32Sfixed32Entry.Key(childComplexity), true + return e.complexity.Maps_Sfixed32Sfixed32Entry.Key(childComplexity), true case "Maps_Sfixed32Sfixed32Entry.value": - if e.complexity.MapsSfixed32Sfixed32Entry.Value == nil { + if e.complexity.Maps_Sfixed32Sfixed32Entry.Value == nil { break } - return e.complexity.MapsSfixed32Sfixed32Entry.Value(childComplexity), true + return e.complexity.Maps_Sfixed32Sfixed32Entry.Value(childComplexity), true case "Maps_Sfixed64Sfixed64Entry.key": - if e.complexity.MapsSfixed64Sfixed64Entry.Key == nil { + if e.complexity.Maps_Sfixed64Sfixed64Entry.Key == nil { break } - return e.complexity.MapsSfixed64Sfixed64Entry.Key(childComplexity), true + return e.complexity.Maps_Sfixed64Sfixed64Entry.Key(childComplexity), true case "Maps_Sfixed64Sfixed64Entry.value": - if e.complexity.MapsSfixed64Sfixed64Entry.Value == nil { + if e.complexity.Maps_Sfixed64Sfixed64Entry.Value == nil { break } - return e.complexity.MapsSfixed64Sfixed64Entry.Value(childComplexity), true + return e.complexity.Maps_Sfixed64Sfixed64Entry.Value(childComplexity), true case "Maps_Sint32Sint32Entry.key": - if e.complexity.MapsSint32Sint32Entry.Key == nil { + if e.complexity.Maps_Sint32Sint32Entry.Key == nil { break } - return e.complexity.MapsSint32Sint32Entry.Key(childComplexity), true + return e.complexity.Maps_Sint32Sint32Entry.Key(childComplexity), true case "Maps_Sint32Sint32Entry.value": - if e.complexity.MapsSint32Sint32Entry.Value == nil { + if e.complexity.Maps_Sint32Sint32Entry.Value == nil { break } - return e.complexity.MapsSint32Sint32Entry.Value(childComplexity), true + return e.complexity.Maps_Sint32Sint32Entry.Value(childComplexity), true case "Maps_Sint64Sint64Entry.key": - if e.complexity.MapsSint64Sint64Entry.Key == nil { + if e.complexity.Maps_Sint64Sint64Entry.Key == nil { break } - return e.complexity.MapsSint64Sint64Entry.Key(childComplexity), true + return e.complexity.Maps_Sint64Sint64Entry.Key(childComplexity), true case "Maps_Sint64Sint64Entry.value": - if e.complexity.MapsSint64Sint64Entry.Value == nil { + if e.complexity.Maps_Sint64Sint64Entry.Value == nil { break } - return e.complexity.MapsSint64Sint64Entry.Value(childComplexity), true + return e.complexity.Maps_Sint64Sint64Entry.Value(childComplexity), true case "Maps_StringBarEntry.key": - if e.complexity.MapsStringBarEntry.Key == nil { + if e.complexity.Maps_StringBarEntry.Key == nil { break } - return e.complexity.MapsStringBarEntry.Key(childComplexity), true + return e.complexity.Maps_StringBarEntry.Key(childComplexity), true case "Maps_StringBarEntry.value": - if e.complexity.MapsStringBarEntry.Value == nil { + if e.complexity.Maps_StringBarEntry.Value == nil { break } - return e.complexity.MapsStringBarEntry.Value(childComplexity), true + return e.complexity.Maps_StringBarEntry.Value(childComplexity), true case "Maps_StringBytesEntry.key": - if e.complexity.MapsStringBytesEntry.Key == nil { + if e.complexity.Maps_StringBytesEntry.Key == nil { break } - return e.complexity.MapsStringBytesEntry.Key(childComplexity), true + return e.complexity.Maps_StringBytesEntry.Key(childComplexity), true case "Maps_StringBytesEntry.value": - if e.complexity.MapsStringBytesEntry.Value == nil { + if e.complexity.Maps_StringBytesEntry.Value == nil { break } - return e.complexity.MapsStringBytesEntry.Value(childComplexity), true + return e.complexity.Maps_StringBytesEntry.Value(childComplexity), true case "Maps_StringDoubleEntry.key": - if e.complexity.MapsStringDoubleEntry.Key == nil { + if e.complexity.Maps_StringDoubleEntry.Key == nil { break } - return e.complexity.MapsStringDoubleEntry.Key(childComplexity), true + return e.complexity.Maps_StringDoubleEntry.Key(childComplexity), true case "Maps_StringDoubleEntry.value": - if e.complexity.MapsStringDoubleEntry.Value == nil { + if e.complexity.Maps_StringDoubleEntry.Value == nil { break } - return e.complexity.MapsStringDoubleEntry.Value(childComplexity), true + return e.complexity.Maps_StringDoubleEntry.Value(childComplexity), true case "Maps_StringFloatEntry.key": - if e.complexity.MapsStringFloatEntry.Key == nil { + if e.complexity.Maps_StringFloatEntry.Key == nil { break } - return e.complexity.MapsStringFloatEntry.Key(childComplexity), true + return e.complexity.Maps_StringFloatEntry.Key(childComplexity), true case "Maps_StringFloatEntry.value": - if e.complexity.MapsStringFloatEntry.Value == nil { + if e.complexity.Maps_StringFloatEntry.Value == nil { break } - return e.complexity.MapsStringFloatEntry.Value(childComplexity), true + return e.complexity.Maps_StringFloatEntry.Value(childComplexity), true case "Maps_StringFooEntry.key": - if e.complexity.MapsStringFooEntry.Key == nil { + if e.complexity.Maps_StringFooEntry.Key == nil { break } - return e.complexity.MapsStringFooEntry.Key(childComplexity), true + return e.complexity.Maps_StringFooEntry.Key(childComplexity), true case "Maps_StringFooEntry.value": - if e.complexity.MapsStringFooEntry.Value == nil { + if e.complexity.Maps_StringFooEntry.Value == nil { break } - return e.complexity.MapsStringFooEntry.Value(childComplexity), true + return e.complexity.Maps_StringFooEntry.Value(childComplexity), true case "Maps_StringStringEntry.key": - if e.complexity.MapsStringStringEntry.Key == nil { + if e.complexity.Maps_StringStringEntry.Key == nil { break } - return e.complexity.MapsStringStringEntry.Key(childComplexity), true + return e.complexity.Maps_StringStringEntry.Key(childComplexity), true case "Maps_StringStringEntry.value": - if e.complexity.MapsStringStringEntry.Value == nil { + if e.complexity.Maps_StringStringEntry.Value == nil { break } - return e.complexity.MapsStringStringEntry.Value(childComplexity), true + return e.complexity.Maps_StringStringEntry.Value(childComplexity), true case "Maps_Uint32Uint32Entry.key": - if e.complexity.MapsUint32Uint32Entry.Key == nil { + if e.complexity.Maps_Uint32Uint32Entry.Key == nil { break } - return e.complexity.MapsUint32Uint32Entry.Key(childComplexity), true + return e.complexity.Maps_Uint32Uint32Entry.Key(childComplexity), true case "Maps_Uint32Uint32Entry.value": - if e.complexity.MapsUint32Uint32Entry.Value == nil { + if e.complexity.Maps_Uint32Uint32Entry.Value == nil { break } - return e.complexity.MapsUint32Uint32Entry.Value(childComplexity), true + return e.complexity.Maps_Uint32Uint32Entry.Value(childComplexity), true case "Maps_Uint64Uint64Entry.key": - if e.complexity.MapsUint64Uint64Entry.Key == nil { + if e.complexity.Maps_Uint64Uint64Entry.Key == nil { break } - return e.complexity.MapsUint64Uint64Entry.Key(childComplexity), true + return e.complexity.Maps_Uint64Uint64Entry.Key(childComplexity), true case "Maps_Uint64Uint64Entry.value": - if e.complexity.MapsUint64Uint64Entry.Value == nil { + if e.complexity.Maps_Uint64Uint64Entry.Value == nil { break } - return e.complexity.MapsUint64Uint64Entry.Value(childComplexity), true + return e.complexity.Maps_Uint64Uint64Entry.Value(childComplexity), true case "Mutation.constructsAny_": if e.complexity.Mutation.ConstructsAny == nil { @@ -914,46 +914,46 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Oneof.Param1(childComplexity), true case "Oneof_Param2.param2": - if e.complexity.OneofParam2.Param2 == nil { + if e.complexity.Oneof_Param2.Param2 == nil { break } - return e.complexity.OneofParam2.Param2(childComplexity), true + return e.complexity.Oneof_Param2.Param2(childComplexity), true case "Oneof_Param3.param3": - if e.complexity.OneofParam3.Param3 == nil { + if e.complexity.Oneof_Param3.Param3 == nil { break } - return e.complexity.OneofParam3.Param3(childComplexity), true + return e.complexity.Oneof_Param3.Param3(childComplexity), true case "Oneof_Param4.param4": - if e.complexity.OneofParam4.Param4 == nil { + if e.complexity.Oneof_Param4.Param4 == nil { break } - return e.complexity.OneofParam4.Param4(childComplexity), true + return e.complexity.Oneof_Param4.Param4(childComplexity), true case "Oneof_Param5.param5": - if e.complexity.OneofParam5.Param5 == nil { + if e.complexity.Oneof_Param5.Param5 == nil { break } - return e.complexity.OneofParam5.Param5(childComplexity), true + return e.complexity.Oneof_Param5.Param5(childComplexity), true case "Oneof_Param6.param6": - if e.complexity.OneofParam6.Param6 == nil { + if e.complexity.Oneof_Param6.Param6 == nil { break } - return e.complexity.OneofParam6.Param6(childComplexity), true + return e.complexity.Oneof_Param6.Param6(childComplexity), true case "Pb_Any.param1": - if e.complexity.PbAny.Param1 == nil { + if e.complexity.Pb_Any.Param1 == nil { break } - return e.complexity.PbAny.Param1(childComplexity), true + return e.complexity.Pb_Any.Param1(childComplexity), true case "Query.dummy": if e.complexity.Query.Dummy == nil { @@ -1040,67 +1040,67 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Ref.LocalTime2(childComplexity), true case "Ref_Bar.param1": - if e.complexity.RefBar.Param1 == nil { + if e.complexity.Ref_Bar.Param1 == nil { break } - return e.complexity.RefBar.Param1(childComplexity), true + return e.complexity.Ref_Bar.Param1(childComplexity), true case "Ref_Foo.bar1": - if e.complexity.RefFoo.Bar1 == nil { + if e.complexity.Ref_Foo.Bar1 == nil { break } - return e.complexity.RefFoo.Bar1(childComplexity), true + return e.complexity.Ref_Foo.Bar1(childComplexity), true case "Ref_Foo.bar2": - if e.complexity.RefFoo.Bar2 == nil { + if e.complexity.Ref_Foo.Bar2 == nil { break } - return e.complexity.RefFoo.Bar2(childComplexity), true + return e.complexity.Ref_Foo.Bar2(childComplexity), true case "Ref_Foo.en1": - if e.complexity.RefFoo.En1 == nil { + if e.complexity.Ref_Foo.En1 == nil { break } - return e.complexity.RefFoo.En1(childComplexity), true + return e.complexity.Ref_Foo.En1(childComplexity), true case "Ref_Foo.en2": - if e.complexity.RefFoo.En2 == nil { + if e.complexity.Ref_Foo.En2 == nil { break } - return e.complexity.RefFoo.En2(childComplexity), true + return e.complexity.Ref_Foo.En2(childComplexity), true case "Ref_Foo.externalTime1": - if e.complexity.RefFoo.ExternalTime1 == nil { + if e.complexity.Ref_Foo.ExternalTime1 == nil { break } - return e.complexity.RefFoo.ExternalTime1(childComplexity), true + return e.complexity.Ref_Foo.ExternalTime1(childComplexity), true case "Ref_Foo.localTime2": - if e.complexity.RefFoo.LocalTime2 == nil { + if e.complexity.Ref_Foo.LocalTime2 == nil { break } - return e.complexity.RefFoo.LocalTime2(childComplexity), true + return e.complexity.Ref_Foo.LocalTime2(childComplexity), true case "Ref_Foo_Bar.param1": - if e.complexity.RefFooBar.Param1 == nil { + if e.complexity.Ref_Foo_Bar.Param1 == nil { break } - return e.complexity.RefFooBar.Param1(childComplexity), true + return e.complexity.Ref_Foo_Bar.Param1(childComplexity), true case "Ref_Foo_Baz_Gz.param1": - if e.complexity.RefFooBazGz.Param1 == nil { + if e.complexity.Ref_Foo_Baz_Gz.Param1 == nil { break } - return e.complexity.RefFooBazGz.Param1(childComplexity), true + return e.complexity.Ref_Foo_Baz_Gz.Param1(childComplexity), true case "Repeated.bar": if e.complexity.Repeated.Bar == nil { @@ -1347,6 +1347,39 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { rc := graphql.GetOperationContext(ctx) ec := executionContext{rc, e} + inputUnmarshalMap := graphql.BuildUnmarshalerMap( + ec.unmarshalInputBazInput, + ec.unmarshalInputFooInput, + ec.unmarshalInputFoo_Foo2Input, + ec.unmarshalInputGoogleProtobuf_TimestampInput, + ec.unmarshalInputMapsInput, + ec.unmarshalInputMaps_BoolBoolEntryInput, + ec.unmarshalInputMaps_Fixed32Fixed32EntryInput, + ec.unmarshalInputMaps_Fixed64Fixed64EntryInput, + ec.unmarshalInputMaps_Int32Int32EntryInput, + ec.unmarshalInputMaps_Int64Int64EntryInput, + ec.unmarshalInputMaps_Sfixed32Sfixed32EntryInput, + ec.unmarshalInputMaps_Sfixed64Sfixed64EntryInput, + ec.unmarshalInputMaps_Sint32Sint32EntryInput, + ec.unmarshalInputMaps_Sint64Sint64EntryInput, + ec.unmarshalInputMaps_StringBarEntryInput, + ec.unmarshalInputMaps_StringBytesEntryInput, + ec.unmarshalInputMaps_StringDoubleEntryInput, + ec.unmarshalInputMaps_StringFloatEntryInput, + ec.unmarshalInputMaps_StringFooEntryInput, + ec.unmarshalInputMaps_StringStringEntryInput, + ec.unmarshalInputMaps_Uint32Uint32EntryInput, + ec.unmarshalInputMaps_Uint64Uint64EntryInput, + ec.unmarshalInputOneofInput, + ec.unmarshalInputRefInput, + ec.unmarshalInputRef_BarInput, + ec.unmarshalInputRef_FooInput, + ec.unmarshalInputRef_Foo_BarInput, + ec.unmarshalInputRef_Foo_Baz_GzInput, + ec.unmarshalInputRepeatedInput, + ec.unmarshalInputScalarsInput, + ec.unmarshalInputTimestampInput, + ) first := true switch rc.Operation.Operation { @@ -1356,6 +1389,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { return nil } first = false + ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) data := ec._Query(ctx, rc.Operation.SelectionSet) var buf bytes.Buffer data.MarshalGQL(&buf) @@ -1370,6 +1404,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { return nil } first = false + ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) data := ec._Mutation(ctx, rc.Operation.SelectionSet) var buf bytes.Buffer data.MarshalGQL(&buf) @@ -1404,13 +1439,11 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er } var sources = []*ast.Source{ - {Name: "pb/constructs.graphql", Input: `directive @Constructs on FIELD_DEFINITION + {Name: "../../pb/constructs.graphql", Input: `directive @Constructs on FIELD_DEFINITION directive @Oneof_Oneof1 on INPUT_FIELD_DEFINITION directive @Oneof_Oneof2 on INPUT_FIELD_DEFINITION directive @Oneof_Oneof3 on INPUT_FIELD_DEFINITION -""" -Any is any json type -""" +"""Any is any json type""" scalar Any enum Bar { BAR1 @@ -1490,16 +1523,7 @@ input Foo_Foo2Input { .setNanos((int) ((millis % 1000) * 1000000)).build(); - Example 5: Compute Timestamp from Java ` + "`" + `Instant.now()` + "`" + `. - - Instant now = Instant.now(); - - Timestamp timestamp = - Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - .setNanos(now.getNano()).build(); - - - Example 6: Compute Timestamp from current time in Python. + Example 5: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() @@ -1603,16 +1627,7 @@ type GoogleProtobuf_Timestamp { .setNanos((int) ((millis % 1000) * 1000000)).build(); - Example 5: Compute Timestamp from Java ` + "`" + `Instant.now()` + "`" + `. - - Instant now = Instant.now(); - - Timestamp timestamp = - Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - .setNanos(now.getNano()).build(); - - - Example 6: Compute Timestamp from current time in Python. + Example 5: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() @@ -2101,7 +2116,7 @@ func (ec *executionContext) field_Mutation_constructsMaps__args(ctx context.Cont var arg0 *pb.Maps if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalOMapsInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps(ctx, tmp) + arg0, err = ec.unmarshalOMapsInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps(ctx, tmp) if err != nil { return nil, err } @@ -2116,7 +2131,7 @@ func (ec *executionContext) field_Mutation_constructsOneof__args(ctx context.Con var arg0 *pb.Oneof if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalOOneofInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof(ctx, tmp) + arg0, err = ec.unmarshalOOneofInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐOneof(ctx, tmp) if err != nil { return nil, err } @@ -2131,7 +2146,7 @@ func (ec *executionContext) field_Mutation_constructsRef__args(ctx context.Conte var arg0 *pb.Ref if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalORefInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef(ctx, tmp) + arg0, err = ec.unmarshalORefInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef(ctx, tmp) if err != nil { return nil, err } @@ -2146,7 +2161,7 @@ func (ec *executionContext) field_Mutation_constructsRepeated__args(ctx context. var arg0 *pb.Repeated if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalORepeatedInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRepeated(ctx, tmp) + arg0, err = ec.unmarshalORepeatedInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRepeated(ctx, tmp) if err != nil { return nil, err } @@ -2161,7 +2176,7 @@ func (ec *executionContext) field_Mutation_constructsScalars__args(ctx context.C var arg0 *pb.Scalars if tmp, ok := rawArgs["in"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) - arg0, err = ec.unmarshalOScalarsInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐScalars(ctx, tmp) + arg0, err = ec.unmarshalOScalarsInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐScalars(ctx, tmp) if err != nil { return nil, err } @@ -2224,21 +2239,17 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region **************************** field.gotpl ***************************** func (ec *executionContext) _Baz_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Baz) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Baz_param1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Baz", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param1, nil @@ -2255,22 +2266,31 @@ func (ec *executionContext) _Baz_param1(ctx context.Context, field graphql.Colle return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Baz_param1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Baz", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Foo_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Foo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Foo_param1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Foo", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param1, nil @@ -2287,22 +2307,31 @@ func (ec *executionContext) _Foo_param1(ctx context.Context, field graphql.Colle return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Foo_param2(ctx context.Context, field graphql.CollectedField, obj *pb.Foo) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Foo_param1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Foo", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Foo_param2(ctx context.Context, field graphql.CollectedField, obj *pb.Foo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Foo_param2(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param2, nil @@ -2319,22 +2348,31 @@ func (ec *executionContext) _Foo_param2(ctx context.Context, field graphql.Colle return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Foo_param2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Foo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Foo_Foo2_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Foo_Foo2) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Foo_Foo2_param1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Foo_Foo2", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param1, nil @@ -2351,22 +2389,31 @@ func (ec *executionContext) _Foo_Foo2_param1(ctx context.Context, field graphql. return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Foo_Foo2_param1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Foo_Foo2", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _GoogleProtobuf_Timestamp_seconds(ctx context.Context, field graphql.CollectedField, obj *timestamppb.Timestamp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_GoogleProtobuf_Timestamp_seconds(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "GoogleProtobuf_Timestamp", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Seconds, nil @@ -2383,22 +2430,31 @@ func (ec *executionContext) _GoogleProtobuf_Timestamp_seconds(ctx context.Contex return ec.marshalOInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) _GoogleProtobuf_Timestamp_nanos(ctx context.Context, field graphql.CollectedField, obj *timestamppb.Timestamp) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_GoogleProtobuf_Timestamp_seconds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "GoogleProtobuf_Timestamp", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _GoogleProtobuf_Timestamp_nanos(ctx context.Context, field graphql.CollectedField, obj *timestamppb.Timestamp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_GoogleProtobuf_Timestamp_nanos(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Nanos, nil @@ -2415,22 +2471,31 @@ func (ec *executionContext) _GoogleProtobuf_Timestamp_nanos(ctx context.Context, return ec.marshalOInt2int32(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_GoogleProtobuf_Timestamp_nanos(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "GoogleProtobuf_Timestamp", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Maps_int32Int32(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_int32Int32(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Maps", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: true, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().Int32Int32(rctx, obj) @@ -2444,25 +2509,40 @@ func (ec *executionContext) _Maps_int32Int32(ctx context.Context, field graphql. } res := resTmp.([]*pb.Maps_Int32Int32Entry) fc.Result = res - return ec.marshalOMaps_Int32Int32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int32Int32Entryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_Int32Int32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Int32Int32Entryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_int64Int64(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_int32Int32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_Int32Int32Entry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_Int32Int32Entry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_Int32Int32Entry", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Maps_int64Int64(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_int64Int64(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().Int64Int64(rctx, obj) @@ -2476,25 +2556,40 @@ func (ec *executionContext) _Maps_int64Int64(ctx context.Context, field graphql. } res := resTmp.([]*pb.Maps_Int64Int64Entry) fc.Result = res - return ec.marshalOMaps_Int64Int64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int64Int64Entryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_Int64Int64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Int64Int64Entryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_uint32Uint32(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_int64Int64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_Int64Int64Entry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_Int64Int64Entry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_Int64Int64Entry", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Maps_uint32Uint32(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_uint32Uint32(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().Uint32Uint32(rctx, obj) @@ -2508,25 +2603,40 @@ func (ec *executionContext) _Maps_uint32Uint32(ctx context.Context, field graphq } res := resTmp.([]*pb.Maps_Uint32Uint32Entry) fc.Result = res - return ec.marshalOMaps_Uint32Uint32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint32Uint32Entryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_Uint32Uint32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Uint32Uint32Entryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_uint64Uint64(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_uint32Uint32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_Uint32Uint32Entry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_Uint32Uint32Entry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_Uint32Uint32Entry", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Maps_uint64Uint64(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_uint64Uint64(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().Uint64Uint64(rctx, obj) @@ -2540,25 +2650,40 @@ func (ec *executionContext) _Maps_uint64Uint64(ctx context.Context, field graphq } res := resTmp.([]*pb.Maps_Uint64Uint64Entry) fc.Result = res - return ec.marshalOMaps_Uint64Uint64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint64Uint64Entryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_Uint64Uint64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Uint64Uint64Entryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_sint32Sint32(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_uint64Uint64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_Uint64Uint64Entry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_Uint64Uint64Entry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_Uint64Uint64Entry", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Maps_sint32Sint32(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_sint32Sint32(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().Sint32Sint32(rctx, obj) @@ -2572,25 +2697,40 @@ func (ec *executionContext) _Maps_sint32Sint32(ctx context.Context, field graphq } res := resTmp.([]*pb.Maps_Sint32Sint32Entry) fc.Result = res - return ec.marshalOMaps_Sint32Sint32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint32Sint32Entryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_Sint32Sint32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sint32Sint32Entryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_sint64Sint64(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_sint32Sint32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_Sint32Sint32Entry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_Sint32Sint32Entry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_Sint32Sint32Entry", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Maps_sint64Sint64(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_sint64Sint64(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().Sint64Sint64(rctx, obj) @@ -2604,25 +2744,40 @@ func (ec *executionContext) _Maps_sint64Sint64(ctx context.Context, field graphq } res := resTmp.([]*pb.Maps_Sint64Sint64Entry) fc.Result = res - return ec.marshalOMaps_Sint64Sint64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint64Sint64Entryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_Sint64Sint64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sint64Sint64Entryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_fixed32Fixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_sint64Sint64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_Sint64Sint64Entry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_Sint64Sint64Entry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_Sint64Sint64Entry", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Maps_fixed32Fixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_fixed32Fixed32(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().Fixed32Fixed32(rctx, obj) @@ -2636,25 +2791,40 @@ func (ec *executionContext) _Maps_fixed32Fixed32(ctx context.Context, field grap } res := resTmp.([]*pb.Maps_Fixed32Fixed32Entry) fc.Result = res - return ec.marshalOMaps_Fixed32Fixed32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed32Fixed32Entryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_Fixed32Fixed32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Fixed32Fixed32Entryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_fixed64Fixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_fixed32Fixed32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_Fixed32Fixed32Entry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_Fixed32Fixed32Entry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_Fixed32Fixed32Entry", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Maps_fixed64Fixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_fixed64Fixed64(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().Fixed64Fixed64(rctx, obj) @@ -2668,25 +2838,40 @@ func (ec *executionContext) _Maps_fixed64Fixed64(ctx context.Context, field grap } res := resTmp.([]*pb.Maps_Fixed64Fixed64Entry) fc.Result = res - return ec.marshalOMaps_Fixed64Fixed64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed64Fixed64Entryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_Fixed64Fixed64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Fixed64Fixed64Entryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_sfixed32Sfixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_fixed64Fixed64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_Fixed64Fixed64Entry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_Fixed64Fixed64Entry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_Fixed64Fixed64Entry", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Maps_sfixed32Sfixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_sfixed32Sfixed32(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().Sfixed32Sfixed32(rctx, obj) @@ -2700,25 +2885,40 @@ func (ec *executionContext) _Maps_sfixed32Sfixed32(ctx context.Context, field gr } res := resTmp.([]*pb.Maps_Sfixed32Sfixed32Entry) fc.Result = res - return ec.marshalOMaps_Sfixed32Sfixed32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed32Sfixed32Entryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_Sfixed32Sfixed32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sfixed32Sfixed32Entryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_sfixed64Sfixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_sfixed32Sfixed32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_Sfixed32Sfixed32Entry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_Sfixed32Sfixed32Entry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_Sfixed32Sfixed32Entry", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Maps_sfixed64Sfixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_sfixed64Sfixed64(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().Sfixed64Sfixed64(rctx, obj) @@ -2732,25 +2932,40 @@ func (ec *executionContext) _Maps_sfixed64Sfixed64(ctx context.Context, field gr } res := resTmp.([]*pb.Maps_Sfixed64Sfixed64Entry) fc.Result = res - return ec.marshalOMaps_Sfixed64Sfixed64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed64Sfixed64Entryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_Sfixed64Sfixed64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sfixed64Sfixed64Entryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_boolBool(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_sfixed64Sfixed64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_Sfixed64Sfixed64Entry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_Sfixed64Sfixed64Entry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_Sfixed64Sfixed64Entry", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Maps_boolBool(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_boolBool(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().BoolBool(rctx, obj) @@ -2764,25 +2979,40 @@ func (ec *executionContext) _Maps_boolBool(ctx context.Context, field graphql.Co } res := resTmp.([]*pb.Maps_BoolBoolEntry) fc.Result = res - return ec.marshalOMaps_BoolBoolEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_BoolBoolEntryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_BoolBoolEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_BoolBoolEntryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_stringString(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_boolBool(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_BoolBoolEntry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_BoolBoolEntry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_BoolBoolEntry", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Maps_stringString(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_stringString(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().StringString(rctx, obj) @@ -2796,25 +3026,40 @@ func (ec *executionContext) _Maps_stringString(ctx context.Context, field graphq } res := resTmp.([]*pb.Maps_StringStringEntry) fc.Result = res - return ec.marshalOMaps_StringStringEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringStringEntryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_StringStringEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringStringEntryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_stringBytes(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_stringString(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_StringStringEntry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_StringStringEntry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_StringStringEntry", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Maps_stringBytes(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_stringBytes(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().StringBytes(rctx, obj) @@ -2828,25 +3073,40 @@ func (ec *executionContext) _Maps_stringBytes(ctx context.Context, field graphql } res := resTmp.([]*pb.Maps_StringBytesEntry) fc.Result = res - return ec.marshalOMaps_StringBytesEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBytesEntryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_StringBytesEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringBytesEntryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_stringFloat(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_stringBytes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_StringBytesEntry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_StringBytesEntry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_StringBytesEntry", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Maps_stringFloat(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_stringFloat(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().StringFloat(rctx, obj) @@ -2860,25 +3120,40 @@ func (ec *executionContext) _Maps_stringFloat(ctx context.Context, field graphql } res := resTmp.([]*pb.Maps_StringFloatEntry) fc.Result = res - return ec.marshalOMaps_StringFloatEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFloatEntryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_StringFloatEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringFloatEntryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_stringDouble(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_stringFloat(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_StringFloatEntry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_StringFloatEntry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_StringFloatEntry", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Maps_stringDouble(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_stringDouble(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().StringDouble(rctx, obj) @@ -2892,25 +3167,40 @@ func (ec *executionContext) _Maps_stringDouble(ctx context.Context, field graphq } res := resTmp.([]*pb.Maps_StringDoubleEntry) fc.Result = res - return ec.marshalOMaps_StringDoubleEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringDoubleEntryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_StringDoubleEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringDoubleEntryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_stringFoo(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_stringDouble(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_StringDoubleEntry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_StringDoubleEntry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_StringDoubleEntry", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Maps_stringFoo(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_stringFoo(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().StringFoo(rctx, obj) @@ -2924,25 +3214,40 @@ func (ec *executionContext) _Maps_stringFoo(ctx context.Context, field graphql.C } res := resTmp.([]*pb.Maps_StringFooEntry) fc.Result = res - return ec.marshalOMaps_StringFooEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFooEntryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_StringFooEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringFooEntryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_stringBar(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_stringFoo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_StringFooEntry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_StringFooEntry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_StringFooEntry", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Maps_stringBar(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_stringBar(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Maps().StringBar(rctx, obj) @@ -2956,25 +3261,40 @@ func (ec *executionContext) _Maps_stringBar(ctx context.Context, field graphql.C } res := resTmp.([]*pb.Maps_StringBarEntry) fc.Result = res - return ec.marshalOMaps_StringBarEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBarEntryᚄ(ctx, field.Selections, res) + return ec.marshalOMaps_StringBarEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringBarEntryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Maps_stringBar(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Maps_StringBarEntry_key(ctx, field) + case "value": + return ec.fieldContext_Maps_StringBarEntry_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps_StringBarEntry", field.Name) + }, + } + return fc, nil } func (ec *executionContext) _Maps_BoolBoolEntry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_BoolBoolEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_BoolBoolEntry_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Maps_BoolBoolEntry", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -2991,22 +3311,31 @@ func (ec *executionContext) _Maps_BoolBoolEntry_key(ctx context.Context, field g return ec.marshalOBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_BoolBoolEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_BoolBoolEntry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_BoolBoolEntry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_BoolBoolEntry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_BoolBoolEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_BoolBoolEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_BoolBoolEntry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3023,22 +3352,31 @@ func (ec *executionContext) _Maps_BoolBoolEntry_value(ctx context.Context, field return ec.marshalOBoolean2bool(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Maps_BoolBoolEntry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_BoolBoolEntry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Maps_Fixed32Fixed32Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Fixed32Fixed32Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Fixed32Fixed32Entry_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Maps_Fixed32Fixed32Entry", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -3055,22 +3393,31 @@ func (ec *executionContext) _Maps_Fixed32Fixed32Entry_key(ctx context.Context, f return ec.marshalOInt2uint32(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_Fixed32Fixed32Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Fixed32Fixed32Entry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_Fixed32Fixed32Entry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_Fixed32Fixed32Entry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_Fixed32Fixed32Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Fixed32Fixed32Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Fixed32Fixed32Entry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3087,22 +3434,31 @@ func (ec *executionContext) _Maps_Fixed32Fixed32Entry_value(ctx context.Context, return ec.marshalOInt2uint32(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_Fixed64Fixed64Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Fixed64Fixed64Entry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "Maps_Fixed64Fixed64Entry", +func (ec *executionContext) fieldContext_Maps_Fixed32Fixed32Entry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_Fixed32Fixed32Entry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_Fixed64Fixed64Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Fixed64Fixed64Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Fixed64Fixed64Entry_key(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -3119,22 +3475,31 @@ func (ec *executionContext) _Maps_Fixed64Fixed64Entry_key(ctx context.Context, f return ec.marshalOInt2uint64(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_Fixed64Fixed64Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Fixed64Fixed64Entry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_Fixed64Fixed64Entry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_Fixed64Fixed64Entry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_Fixed64Fixed64Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Fixed64Fixed64Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Fixed64Fixed64Entry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3151,22 +3516,31 @@ func (ec *executionContext) _Maps_Fixed64Fixed64Entry_value(ctx context.Context, return ec.marshalOInt2uint64(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Maps_Fixed64Fixed64Entry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_Fixed64Fixed64Entry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Maps_Int32Int32Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Int32Int32Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Int32Int32Entry_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Maps_Int32Int32Entry", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -3183,22 +3557,31 @@ func (ec *executionContext) _Maps_Int32Int32Entry_key(ctx context.Context, field return ec.marshalOInt2int32(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_Int32Int32Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Int32Int32Entry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_Int32Int32Entry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_Int32Int32Entry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_Int32Int32Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Int32Int32Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Int32Int32Entry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3215,22 +3598,31 @@ func (ec *executionContext) _Maps_Int32Int32Entry_value(ctx context.Context, fie return ec.marshalOInt2int32(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Maps_Int32Int32Entry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_Int32Int32Entry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Maps_Int64Int64Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Int64Int64Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Int64Int64Entry_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Maps_Int64Int64Entry", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -3247,22 +3639,31 @@ func (ec *executionContext) _Maps_Int64Int64Entry_key(ctx context.Context, field return ec.marshalOInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_Int64Int64Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Int64Int64Entry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_Int64Int64Entry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_Int64Int64Entry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_Int64Int64Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Int64Int64Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Int64Int64Entry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3279,22 +3680,31 @@ func (ec *executionContext) _Maps_Int64Int64Entry_value(ctx context.Context, fie return ec.marshalOInt2int64(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Maps_Int64Int64Entry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_Int64Int64Entry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Maps_Sfixed32Sfixed32Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sfixed32Sfixed32Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Sfixed32Sfixed32Entry_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Maps_Sfixed32Sfixed32Entry", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -3311,22 +3721,31 @@ func (ec *executionContext) _Maps_Sfixed32Sfixed32Entry_key(ctx context.Context, return ec.marshalOInt2int32(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_Sfixed32Sfixed32Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sfixed32Sfixed32Entry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_Sfixed32Sfixed32Entry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_Sfixed32Sfixed32Entry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_Sfixed32Sfixed32Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sfixed32Sfixed32Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Sfixed32Sfixed32Entry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3343,22 +3762,31 @@ func (ec *executionContext) _Maps_Sfixed32Sfixed32Entry_value(ctx context.Contex return ec.marshalOInt2int32(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Maps_Sfixed32Sfixed32Entry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_Sfixed32Sfixed32Entry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Maps_Sfixed64Sfixed64Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sfixed64Sfixed64Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Sfixed64Sfixed64Entry_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Maps_Sfixed64Sfixed64Entry", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -3375,22 +3803,31 @@ func (ec *executionContext) _Maps_Sfixed64Sfixed64Entry_key(ctx context.Context, return ec.marshalOInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_Sfixed64Sfixed64Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sfixed64Sfixed64Entry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_Sfixed64Sfixed64Entry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_Sfixed64Sfixed64Entry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_Sfixed64Sfixed64Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sfixed64Sfixed64Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Sfixed64Sfixed64Entry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3407,22 +3844,31 @@ func (ec *executionContext) _Maps_Sfixed64Sfixed64Entry_value(ctx context.Contex return ec.marshalOInt2int64(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Maps_Sfixed64Sfixed64Entry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_Sfixed64Sfixed64Entry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Maps_Sint32Sint32Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sint32Sint32Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Sint32Sint32Entry_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Maps_Sint32Sint32Entry", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -3439,22 +3885,31 @@ func (ec *executionContext) _Maps_Sint32Sint32Entry_key(ctx context.Context, fie return ec.marshalOInt2int32(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_Sint32Sint32Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sint32Sint32Entry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_Sint32Sint32Entry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_Sint32Sint32Entry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_Sint32Sint32Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sint32Sint32Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Sint32Sint32Entry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3471,22 +3926,31 @@ func (ec *executionContext) _Maps_Sint32Sint32Entry_value(ctx context.Context, f return ec.marshalOInt2int32(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Maps_Sint32Sint32Entry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_Sint32Sint32Entry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Maps_Sint64Sint64Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sint64Sint64Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Sint64Sint64Entry_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Maps_Sint64Sint64Entry", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -3503,22 +3967,31 @@ func (ec *executionContext) _Maps_Sint64Sint64Entry_key(ctx context.Context, fie return ec.marshalOInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_Sint64Sint64Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sint64Sint64Entry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_Sint64Sint64Entry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_Sint64Sint64Entry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_Sint64Sint64Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sint64Sint64Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Sint64Sint64Entry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3535,22 +4008,31 @@ func (ec *executionContext) _Maps_Sint64Sint64Entry_value(ctx context.Context, f return ec.marshalOInt2int64(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Maps_Sint64Sint64Entry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_Sint64Sint64Entry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Maps_StringBarEntry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringBarEntry) (ret graphql.Marshaler) { - defer func() { + fc, err := ec.fieldContext_Maps_StringBarEntry_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Maps_StringBarEntry", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -3567,22 +4049,31 @@ func (ec *executionContext) _Maps_StringBarEntry_key(ctx context.Context, field return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_StringBarEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringBarEntry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_StringBarEntry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_StringBarEntry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_StringBarEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringBarEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_StringBarEntry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3596,25 +4087,34 @@ func (ec *executionContext) _Maps_StringBarEntry_value(ctx context.Context, fiel } res := resTmp.(pb.Bar) fc.Result = res - return ec.marshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx, field.Selections, res) + return ec.marshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBar(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Maps_StringBarEntry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_StringBarEntry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Bar does not have child fields") + }, + } + return fc, nil } func (ec *executionContext) _Maps_StringBytesEntry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringBytesEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_StringBytesEntry_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Maps_StringBytesEntry", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -3631,22 +4131,31 @@ func (ec *executionContext) _Maps_StringBytesEntry_key(ctx context.Context, fiel return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_StringBytesEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringBytesEntry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_StringBytesEntry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_StringBytesEntry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_StringBytesEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringBytesEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_StringBytesEntry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3663,22 +4172,31 @@ func (ec *executionContext) _Maps_StringBytesEntry_value(ctx context.Context, fi return ec.marshalOBytes2ᚕbyte(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Maps_StringBytesEntry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_StringBytesEntry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Bytes does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Maps_StringDoubleEntry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringDoubleEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_StringDoubleEntry_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Maps_StringDoubleEntry", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -3695,22 +4213,31 @@ func (ec *executionContext) _Maps_StringDoubleEntry_key(ctx context.Context, fie return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_StringDoubleEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringDoubleEntry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_StringDoubleEntry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_StringDoubleEntry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_StringDoubleEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringDoubleEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_StringDoubleEntry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3727,22 +4254,31 @@ func (ec *executionContext) _Maps_StringDoubleEntry_value(ctx context.Context, f return ec.marshalOFloat2float64(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Maps_StringDoubleEntry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_StringDoubleEntry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Maps_StringFloatEntry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringFloatEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_StringFloatEntry_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Maps_StringFloatEntry", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -3759,22 +4295,31 @@ func (ec *executionContext) _Maps_StringFloatEntry_key(ctx context.Context, fiel return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_StringFloatEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringFloatEntry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_StringFloatEntry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_StringFloatEntry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_StringFloatEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringFloatEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_StringFloatEntry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3791,22 +4336,31 @@ func (ec *executionContext) _Maps_StringFloatEntry_value(ctx context.Context, fi return ec.marshalOFloat2float32(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Maps_StringFloatEntry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_StringFloatEntry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Maps_StringFooEntry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringFooEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_StringFooEntry_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Maps_StringFooEntry", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -3823,22 +4377,31 @@ func (ec *executionContext) _Maps_StringFooEntry_key(ctx context.Context, field return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_StringFooEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringFooEntry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_StringFooEntry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_StringFooEntry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_StringFooEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringFooEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_StringFooEntry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3852,25 +4415,40 @@ func (ec *executionContext) _Maps_StringFooEntry_value(ctx context.Context, fiel } res := resTmp.(*pb.Foo) fc.Result = res - return ec.marshalOFoo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx, field.Selections, res) + return ec.marshalOFoo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Maps_StringFooEntry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_StringFooEntry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "param1": + return ec.fieldContext_Foo_param1(ctx, field) + case "param2": + return ec.fieldContext_Foo_param2(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Foo", field.Name) + }, + } + return fc, nil } func (ec *executionContext) _Maps_StringStringEntry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringStringEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_StringStringEntry_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Maps_StringStringEntry", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -3887,22 +4465,31 @@ func (ec *executionContext) _Maps_StringStringEntry_key(ctx context.Context, fie return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_StringStringEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringStringEntry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_StringStringEntry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_StringStringEntry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_StringStringEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringStringEntry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_StringStringEntry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3919,22 +4506,31 @@ func (ec *executionContext) _Maps_StringStringEntry_value(ctx context.Context, f return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Maps_StringStringEntry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_StringStringEntry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Maps_Uint32Uint32Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Uint32Uint32Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Uint32Uint32Entry_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Maps_Uint32Uint32Entry", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -3951,22 +4547,31 @@ func (ec *executionContext) _Maps_Uint32Uint32Entry_key(ctx context.Context, fie return ec.marshalOInt2uint32(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_Uint32Uint32Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Uint32Uint32Entry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_Uint32Uint32Entry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_Uint32Uint32Entry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_Uint32Uint32Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Uint32Uint32Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Uint32Uint32Entry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -3983,22 +4588,31 @@ func (ec *executionContext) _Maps_Uint32Uint32Entry_value(ctx context.Context, f return ec.marshalOInt2uint32(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_Uint64Uint64Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Uint64Uint64Entry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "Maps_Uint64Uint64Entry", +func (ec *executionContext) fieldContext_Maps_Uint32Uint32Entry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_Uint32Uint32Entry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_Uint64Uint64Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Uint64Uint64Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Uint64Uint64Entry_key(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Key, nil @@ -4015,22 +4629,31 @@ func (ec *executionContext) _Maps_Uint64Uint64Entry_key(ctx context.Context, fie return ec.marshalOInt2uint64(ctx, field.Selections, res) } -func (ec *executionContext) _Maps_Uint64Uint64Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Uint64Uint64Entry) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Maps_Uint64Uint64Entry_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Maps_Uint64Uint64Entry", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Maps_Uint64Uint64Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Uint64Uint64Entry) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Maps_Uint64Uint64Entry_value(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Value, nil @@ -4047,33 +4670,35 @@ func (ec *executionContext) _Maps_Uint64Uint64Entry_value(ctx context.Context, f return ec.marshalOInt2uint64(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Maps_Uint64Uint64Entry_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Maps_Uint64Uint64Entry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Mutation_constructsScalars_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_constructsScalars_(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Mutation", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: true, - } - - ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_constructsScalars__args(ctx, rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - fc.Args = args resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().ConstructsScalars(rctx, args["in"].(*pb.Scalars)) + return ec.resolvers.Mutation().ConstructsScalars(rctx, fc.Args["in"].(*pb.Scalars)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Constructs == nil { @@ -4092,7 +4717,7 @@ func (ec *executionContext) _Mutation_constructsScalars_(ctx context.Context, fi if data, ok := tmp.(*pb.Scalars); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Scalars`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Scalars`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -4103,36 +4728,83 @@ func (ec *executionContext) _Mutation_constructsScalars_(ctx context.Context, fi } res := resTmp.(*pb.Scalars) fc.Result = res - return ec.marshalOScalars2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐScalars(ctx, field.Selections, res) + return ec.marshalOScalars2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐScalars(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_constructsRepeated_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_constructsScalars_(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "double": + return ec.fieldContext_Scalars_double(ctx, field) + case "float": + return ec.fieldContext_Scalars_float(ctx, field) + case "int32": + return ec.fieldContext_Scalars_int32(ctx, field) + case "int64": + return ec.fieldContext_Scalars_int64(ctx, field) + case "uint32": + return ec.fieldContext_Scalars_uint32(ctx, field) + case "uint64": + return ec.fieldContext_Scalars_uint64(ctx, field) + case "sint32": + return ec.fieldContext_Scalars_sint32(ctx, field) + case "sint64": + return ec.fieldContext_Scalars_sint64(ctx, field) + case "fixed32": + return ec.fieldContext_Scalars_fixed32(ctx, field) + case "fixed64": + return ec.fieldContext_Scalars_fixed64(ctx, field) + case "sfixed32": + return ec.fieldContext_Scalars_sfixed32(ctx, field) + case "sfixed64": + return ec.fieldContext_Scalars_sfixed64(ctx, field) + case "bool": + return ec.fieldContext_Scalars_bool(ctx, field) + case "stringX": + return ec.fieldContext_Scalars_stringX(ctx, field) + case "bytes": + return ec.fieldContext_Scalars_bytes(ctx, field) + case "stringOptional": + return ec.fieldContext_Scalars_stringOptional(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Scalars", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_constructsRepeated__args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Mutation_constructsScalars__args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_constructsRepeated_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_constructsRepeated_(ctx, field) + if err != nil { return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().ConstructsRepeated(rctx, args["in"].(*pb.Repeated)) + return ec.resolvers.Mutation().ConstructsRepeated(rctx, fc.Args["in"].(*pb.Repeated)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Constructs == nil { @@ -4151,7 +4823,7 @@ func (ec *executionContext) _Mutation_constructsRepeated_(ctx context.Context, f if data, ok := tmp.(*pb.Repeated); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Repeated`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Repeated`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -4162,36 +4834,85 @@ func (ec *executionContext) _Mutation_constructsRepeated_(ctx context.Context, f } res := resTmp.(*pb.Repeated) fc.Result = res - return ec.marshalORepeated2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRepeated(ctx, field.Selections, res) + return ec.marshalORepeated2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRepeated(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_constructsMaps_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_constructsRepeated_(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "double": + return ec.fieldContext_Repeated_double(ctx, field) + case "float": + return ec.fieldContext_Repeated_float(ctx, field) + case "int32": + return ec.fieldContext_Repeated_int32(ctx, field) + case "int64": + return ec.fieldContext_Repeated_int64(ctx, field) + case "uint32": + return ec.fieldContext_Repeated_uint32(ctx, field) + case "uint64": + return ec.fieldContext_Repeated_uint64(ctx, field) + case "sint32": + return ec.fieldContext_Repeated_sint32(ctx, field) + case "sint64": + return ec.fieldContext_Repeated_sint64(ctx, field) + case "fixed32": + return ec.fieldContext_Repeated_fixed32(ctx, field) + case "fixed64": + return ec.fieldContext_Repeated_fixed64(ctx, field) + case "sfixed32": + return ec.fieldContext_Repeated_sfixed32(ctx, field) + case "sfixed64": + return ec.fieldContext_Repeated_sfixed64(ctx, field) + case "bool": + return ec.fieldContext_Repeated_bool(ctx, field) + case "stringX": + return ec.fieldContext_Repeated_stringX(ctx, field) + case "bytes": + return ec.fieldContext_Repeated_bytes(ctx, field) + case "foo": + return ec.fieldContext_Repeated_foo(ctx, field) + case "bar": + return ec.fieldContext_Repeated_bar(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Repeated", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_constructsMaps__args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Mutation_constructsRepeated__args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_constructsMaps_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_constructsMaps_(ctx, field) + if err != nil { return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().ConstructsMaps(rctx, args["in"].(*pb.Maps)) + return ec.resolvers.Mutation().ConstructsMaps(rctx, fc.Args["in"].(*pb.Maps)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Constructs == nil { @@ -4210,7 +4931,7 @@ func (ec *executionContext) _Mutation_constructsMaps_(ctx context.Context, field if data, ok := tmp.(*pb.Maps); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Maps`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Maps`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -4221,36 +4942,85 @@ func (ec *executionContext) _Mutation_constructsMaps_(ctx context.Context, field } res := resTmp.(*pb.Maps) fc.Result = res - return ec.marshalOMaps2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps(ctx, field.Selections, res) + return ec.marshalOMaps2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_constructsAny_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_constructsMaps_(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "int32Int32": + return ec.fieldContext_Maps_int32Int32(ctx, field) + case "int64Int64": + return ec.fieldContext_Maps_int64Int64(ctx, field) + case "uint32Uint32": + return ec.fieldContext_Maps_uint32Uint32(ctx, field) + case "uint64Uint64": + return ec.fieldContext_Maps_uint64Uint64(ctx, field) + case "sint32Sint32": + return ec.fieldContext_Maps_sint32Sint32(ctx, field) + case "sint64Sint64": + return ec.fieldContext_Maps_sint64Sint64(ctx, field) + case "fixed32Fixed32": + return ec.fieldContext_Maps_fixed32Fixed32(ctx, field) + case "fixed64Fixed64": + return ec.fieldContext_Maps_fixed64Fixed64(ctx, field) + case "sfixed32Sfixed32": + return ec.fieldContext_Maps_sfixed32Sfixed32(ctx, field) + case "sfixed64Sfixed64": + return ec.fieldContext_Maps_sfixed64Sfixed64(ctx, field) + case "boolBool": + return ec.fieldContext_Maps_boolBool(ctx, field) + case "stringString": + return ec.fieldContext_Maps_stringString(ctx, field) + case "stringBytes": + return ec.fieldContext_Maps_stringBytes(ctx, field) + case "stringFloat": + return ec.fieldContext_Maps_stringFloat(ctx, field) + case "stringDouble": + return ec.fieldContext_Maps_stringDouble(ctx, field) + case "stringFoo": + return ec.fieldContext_Maps_stringFoo(ctx, field) + case "stringBar": + return ec.fieldContext_Maps_stringBar(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Maps", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_constructsAny__args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Mutation_constructsMaps__args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_constructsAny_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_constructsAny_(ctx, field) + if err != nil { return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().ConstructsAny(rctx, args["in"].(*anypb.Any)) + return ec.resolvers.Mutation().ConstructsAny(rctx, fc.Args["in"].(*anypb.Any)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Constructs == nil { @@ -4269,7 +5039,7 @@ func (ec *executionContext) _Mutation_constructsAny_(ctx context.Context, field if data, ok := tmp.(*pb.Any); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Any`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Any`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -4280,25 +5050,49 @@ func (ec *executionContext) _Mutation_constructsAny_(ctx context.Context, field } res := resTmp.(*pb.Any) fc.Result = res - return ec.marshalOPb_Any2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐAny(ctx, field.Selections, res) + return ec.marshalOPb_Any2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐAny(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_constructsEmpty_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_constructsAny_(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "param1": + return ec.fieldContext_Pb_Any_param1(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Pb_Any", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_constructsAny__args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return } + return fc, nil +} +func (ec *executionContext) _Mutation_constructsEmpty_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_constructsEmpty_(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -4335,22 +5129,31 @@ func (ec *executionContext) _Mutation_constructsEmpty_(ctx context.Context, fiel return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_constructsEmpty2_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_constructsEmpty_(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Mutation_constructsEmpty2_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_constructsEmpty2_(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -4387,22 +5190,31 @@ func (ec *executionContext) _Mutation_constructsEmpty2_(ctx context.Context, fie return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_constructsEmpty3_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_constructsEmpty2_(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Mutation_constructsEmpty3_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_constructsEmpty3_(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children @@ -4439,33 +5251,35 @@ func (ec *executionContext) _Mutation_constructsEmpty3_(ctx context.Context, fie return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_constructsRef_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_constructsEmpty3_(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, } + return fc, nil +} - ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_constructsRef__args(ctx, rawArgs) +func (ec *executionContext) _Mutation_constructsRef_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_constructsRef_(ctx, field) if err != nil { - ec.Error(ctx, err) return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().ConstructsRef(rctx, args["in"].(*pb.Ref)) + return ec.resolvers.Mutation().ConstructsRef(rctx, fc.Args["in"].(*pb.Ref)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Constructs == nil { @@ -4484,7 +5298,7 @@ func (ec *executionContext) _Mutation_constructsRef_(ctx context.Context, field if data, ok := tmp.(*pb.Ref); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Ref`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Ref`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -4495,36 +5309,73 @@ func (ec *executionContext) _Mutation_constructsRef_(ctx context.Context, field } res := resTmp.(*pb.Ref) fc.Result = res - return ec.marshalORef2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef(ctx, field.Selections, res) + return ec.marshalORef2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_constructsOneof_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_constructsRef_(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "localTime2": + return ec.fieldContext_Ref_localTime2(ctx, field) + case "external": + return ec.fieldContext_Ref_external(ctx, field) + case "localTime": + return ec.fieldContext_Ref_localTime(ctx, field) + case "file": + return ec.fieldContext_Ref_file(ctx, field) + case "fileMsg": + return ec.fieldContext_Ref_fileMsg(ctx, field) + case "fileEnum": + return ec.fieldContext_Ref_fileEnum(ctx, field) + case "local": + return ec.fieldContext_Ref_local(ctx, field) + case "foreign": + return ec.fieldContext_Ref_foreign(ctx, field) + case "en1": + return ec.fieldContext_Ref_en1(ctx, field) + case "en2": + return ec.fieldContext_Ref_en2(ctx, field) + case "gz": + return ec.fieldContext_Ref_gz(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Ref", field.Name) + }, } - + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Mutation_constructsOneof__args(ctx, rawArgs) - if err != nil { + if fc.Args, err = ec.field_Mutation_constructsRef__args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_constructsOneof_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_constructsOneof_(ctx, field) + if err != nil { return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().ConstructsOneof(rctx, args["in"].(*pb.Oneof)) + return ec.resolvers.Mutation().ConstructsOneof(rctx, fc.Args["in"].(*pb.Oneof)) } directive1 := func(ctx context.Context) (interface{}, error) { if ec.directives.Constructs == nil { @@ -4543,7 +5394,7 @@ func (ec *executionContext) _Mutation_constructsOneof_(ctx context.Context, fiel if data, ok := tmp.(*pb.Oneof); ok { return data, nil } - return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Oneof`, tmp) + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Oneof`, tmp) }) if err != nil { ec.Error(ctx, err) @@ -4554,26 +5405,56 @@ func (ec *executionContext) _Mutation_constructsOneof_(ctx context.Context, fiel } res := resTmp.(*pb.Oneof) fc.Result = res - return ec.marshalOOneof2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof(ctx, field.Selections, res) + return ec.marshalOOneof2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐOneof(ctx, field.Selections, res) } -func (ec *executionContext) _Mutation_constructsCallWithId(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Mutation_constructsOneof_(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Mutation", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "param1": + return ec.fieldContext_Oneof_param1(ctx, field) + case "oneof1": + return ec.fieldContext_Oneof_oneof1(ctx, field) + case "oneof2": + return ec.fieldContext_Oneof_oneof2(ctx, field) + case "oneof3": + return ec.fieldContext_Oneof_oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Oneof", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_constructsOneof__args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return } + return fc, nil +} +func (ec *executionContext) _Mutation_constructsCallWithId(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_constructsCallWithId(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { directive0 := func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Mutation().ConstructsCallWithID(rctx) @@ -4609,22 +5490,31 @@ func (ec *executionContext) _Mutation_constructsCallWithId(ctx context.Context, return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Mutation_constructsCallWithId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Oneof_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Oneof_param1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Oneof", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param1, nil @@ -4641,22 +5531,31 @@ func (ec *executionContext) _Oneof_param1(ctx context.Context, field graphql.Col return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Oneof_param1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Oneof", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Oneof_oneof1(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Oneof_oneof1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Oneof", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: true, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Oneof().Oneof1(rctx, obj) @@ -4670,25 +5569,34 @@ func (ec *executionContext) _Oneof_oneof1(ctx context.Context, field graphql.Col } res := resTmp.(pb.Oneof_Oneof1) fc.Result = res - return ec.marshalOOneof_Oneof12githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof_Oneof1(ctx, field.Selections, res) + return ec.marshalOOneof_Oneof12githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐOneof_Oneof1(ctx, field.Selections, res) } -func (ec *executionContext) _Oneof_oneof2(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Oneof_oneof1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Oneof", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Oneof_Oneof1 does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Oneof_oneof2(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Oneof_oneof2(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Oneof().Oneof2(rctx, obj) @@ -4702,25 +5610,34 @@ func (ec *executionContext) _Oneof_oneof2(ctx context.Context, field graphql.Col } res := resTmp.(pb.Oneof_Oneof2) fc.Result = res - return ec.marshalOOneof_Oneof22githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof_Oneof2(ctx, field.Selections, res) + return ec.marshalOOneof_Oneof22githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐOneof_Oneof2(ctx, field.Selections, res) } -func (ec *executionContext) _Oneof_oneof3(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Oneof_oneof2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Oneof", Field: field, - Args: nil, IsMethod: true, IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Oneof_Oneof2 does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Oneof_oneof3(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Oneof_oneof3(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Oneof().Oneof3(rctx, obj) @@ -4734,25 +5651,34 @@ func (ec *executionContext) _Oneof_oneof3(ctx context.Context, field graphql.Col } res := resTmp.(pb.Oneof_Oneof3) fc.Result = res - return ec.marshalOOneof_Oneof32githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof_Oneof3(ctx, field.Selections, res) + return ec.marshalOOneof_Oneof32githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐOneof_Oneof3(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Oneof_oneof3(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Oneof", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Oneof_Oneof3 does not have child fields") + }, + } + return fc, nil } func (ec *executionContext) _Oneof_Param2_param2(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof_Param2) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Oneof_Param2_param2(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Oneof_Param2", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param2, nil @@ -4769,22 +5695,31 @@ func (ec *executionContext) _Oneof_Param2_param2(ctx context.Context, field grap return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Oneof_Param2_param2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Oneof_Param2", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Oneof_Param3_param3(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof_Param3) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Oneof_Param3_param3(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Oneof_Param3", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param3, nil @@ -4801,22 +5736,31 @@ func (ec *executionContext) _Oneof_Param3_param3(ctx context.Context, field grap return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Oneof_Param3_param3(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Oneof_Param3", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Oneof_Param4_param4(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof_Param4) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Oneof_Param4_param4(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Oneof_Param4", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param4, nil @@ -4833,22 +5777,31 @@ func (ec *executionContext) _Oneof_Param4_param4(ctx context.Context, field grap return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Oneof_Param4_param4(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Oneof_Param4", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Oneof_Param5_param5(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof_Param5) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Oneof_Param5_param5(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Oneof_Param5", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param5, nil @@ -4865,22 +5818,31 @@ func (ec *executionContext) _Oneof_Param5_param5(ctx context.Context, field grap return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Oneof_Param5_param5(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Oneof_Param5", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Oneof_Param6_param6(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof_Param6) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Oneof_Param6_param6(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Oneof_Param6", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param6, nil @@ -4897,22 +5859,31 @@ func (ec *executionContext) _Oneof_Param6_param6(ctx context.Context, field grap return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Oneof_Param6_param6(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Oneof_Param6", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Pb_Any_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Any) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Pb_Any_param1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Pb_Any", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param1, nil @@ -4929,22 +5900,31 @@ func (ec *executionContext) _Pb_Any_param1(ctx context.Context, field graphql.Co return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Pb_Any_param1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Pb_Any", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Query_dummy(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_dummy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: true, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.resolvers.Query().Dummy(rctx) @@ -4961,32 +5941,34 @@ func (ec *executionContext) _Query_dummy(ctx context.Context, field graphql.Coll return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Query_dummy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Query", Field: field, - Args: nil, IsMethod: true, - IsResolver: false, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, } + return fc, nil +} - ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field_Query___type_args(ctx, rawArgs) +func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query___type(ctx, field) if err != nil { - ec.Error(ctx, err) return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.introspectType(args["name"].(string)) + return ec.introspectType(fc.Args["name"].(string)) }) if err != nil { ec.Error(ctx, err) @@ -5000,22 +5982,64 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Query", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return } + return fc, nil +} +func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query___schema(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return ec.introspectSchema() @@ -5032,22 +6056,45 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } -func (ec *executionContext) _Ref_localTime2(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "Ref", +func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", Field: field, - Args: nil, - IsMethod: false, + IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "description": + return ec.fieldContext___Schema_description(ctx, field) + case "types": + return ec.fieldContext___Schema_types(ctx, field) + case "queryType": + return ec.fieldContext___Schema_queryType(ctx, field) + case "mutationType": + return ec.fieldContext___Schema_mutationType(ctx, field) + case "subscriptionType": + return ec.fieldContext___Schema_subscriptionType(ctx, field) + case "directives": + return ec.fieldContext___Schema_directives(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Ref_localTime2(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_localTime2(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.LocalTime2, nil @@ -5061,25 +6108,38 @@ func (ec *executionContext) _Ref_localTime2(ctx context.Context, field graphql.C } res := resTmp.(*pb.Timestamp) fc.Result = res - return ec.marshalOTimestamp2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐTimestamp(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐTimestamp(ctx, field.Selections, res) } -func (ec *executionContext) _Ref_external(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Ref_localTime2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Ref", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "time": + return ec.fieldContext_Timestamp_time(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Timestamp", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Ref_external(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_external(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.External, nil @@ -5096,22 +6156,37 @@ func (ec *executionContext) _Ref_external(ctx context.Context, field graphql.Col return ec.marshalOGoogleProtobuf_Timestamp2ᚖgoogleᚗgolangᚗorgᚋprotobufᚋtypesᚋknownᚋtimestamppbᚐTimestamp(ctx, field.Selections, res) } -func (ec *executionContext) _Ref_localTime(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Ref_external(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Ref", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "seconds": + return ec.fieldContext_GoogleProtobuf_Timestamp_seconds(ctx, field) + case "nanos": + return ec.fieldContext_GoogleProtobuf_Timestamp_nanos(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type GoogleProtobuf_Timestamp", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Ref_localTime(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_localTime(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.LocalTime, nil @@ -5125,25 +6200,38 @@ func (ec *executionContext) _Ref_localTime(ctx context.Context, field graphql.Co } res := resTmp.(*pb.Timestamp) fc.Result = res - return ec.marshalOTimestamp2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐTimestamp(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐTimestamp(ctx, field.Selections, res) } -func (ec *executionContext) _Ref_file(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Ref_localTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Ref", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "time": + return ec.fieldContext_Timestamp_time(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Timestamp", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Ref_file(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_file(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.File, nil @@ -5157,25 +6245,38 @@ func (ec *executionContext) _Ref_file(ctx context.Context, field graphql.Collect } res := resTmp.(*pb.Baz) fc.Result = res - return ec.marshalOBaz2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBaz(ctx, field.Selections, res) + return ec.marshalOBaz2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBaz(ctx, field.Selections, res) } -func (ec *executionContext) _Ref_fileMsg(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Ref_file(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Ref", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "param1": + return ec.fieldContext_Baz_param1(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Baz", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Ref_fileMsg(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_fileMsg(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.FileMsg, nil @@ -5189,25 +6290,40 @@ func (ec *executionContext) _Ref_fileMsg(ctx context.Context, field graphql.Coll } res := resTmp.(*pb.Foo) fc.Result = res - return ec.marshalOFoo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx, field.Selections, res) + return ec.marshalOFoo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo(ctx, field.Selections, res) } -func (ec *executionContext) _Ref_fileEnum(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Ref_fileMsg(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Ref", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "param1": + return ec.fieldContext_Foo_param1(ctx, field) + case "param2": + return ec.fieldContext_Foo_param2(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Foo", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Ref_fileEnum(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_fileEnum(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.FileEnum, nil @@ -5221,25 +6337,34 @@ func (ec *executionContext) _Ref_fileEnum(ctx context.Context, field graphql.Col } res := resTmp.(pb.Bar) fc.Result = res - return ec.marshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx, field.Selections, res) + return ec.marshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBar(ctx, field.Selections, res) } -func (ec *executionContext) _Ref_local(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Ref_fileEnum(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Ref", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Bar does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Ref_local(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_local(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Local, nil @@ -5253,25 +6378,48 @@ func (ec *executionContext) _Ref_local(ctx context.Context, field graphql.Collec } res := resTmp.(*pb.Ref_Foo) fc.Result = res - return ec.marshalORef_Foo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo(ctx, field.Selections, res) + return ec.marshalORef_Foo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo(ctx, field.Selections, res) } -func (ec *executionContext) _Ref_foreign(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Ref_local(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Ref", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "bar1": + return ec.fieldContext_Ref_Foo_bar1(ctx, field) + case "localTime2": + return ec.fieldContext_Ref_Foo_localTime2(ctx, field) + case "externalTime1": + return ec.fieldContext_Ref_Foo_externalTime1(ctx, field) + case "bar2": + return ec.fieldContext_Ref_Foo_bar2(ctx, field) + case "en1": + return ec.fieldContext_Ref_Foo_en1(ctx, field) + case "en2": + return ec.fieldContext_Ref_Foo_en2(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Ref_Foo", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Ref_foreign(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_foreign(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Foreign, nil @@ -5285,25 +6433,38 @@ func (ec *executionContext) _Ref_foreign(ctx context.Context, field graphql.Coll } res := resTmp.(*pb.Foo_Foo2) fc.Result = res - return ec.marshalOFoo_Foo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo_Foo2(ctx, field.Selections, res) + return ec.marshalOFoo_Foo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo_Foo2(ctx, field.Selections, res) } -func (ec *executionContext) _Ref_en1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Ref_foreign(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Ref", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "param1": + return ec.fieldContext_Foo_Foo2_param1(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Foo_Foo2", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Ref_en1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_en1(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.En1, nil @@ -5317,25 +6478,34 @@ func (ec *executionContext) _Ref_en1(ctx context.Context, field graphql.Collecte } res := resTmp.(pb.Ref_Foo_En) fc.Result = res - return ec.marshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_En(ctx, field.Selections, res) + return ec.marshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_En(ctx, field.Selections, res) } -func (ec *executionContext) _Ref_en2(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Ref_en1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Ref", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Ref_Foo_En does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Ref_en2(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_en2(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.En2, nil @@ -5349,25 +6519,34 @@ func (ec *executionContext) _Ref_en2(ctx context.Context, field graphql.Collecte } res := resTmp.(pb.Ref_Foo_Bar_En) fc.Result = res - return ec.marshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar_En(ctx, field.Selections, res) + return ec.marshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_Bar_En(ctx, field.Selections, res) } -func (ec *executionContext) _Ref_gz(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Ref_en2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Ref", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Ref_Foo_Bar_En does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Ref_gz(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_gz(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Gz, nil @@ -5381,25 +6560,38 @@ func (ec *executionContext) _Ref_gz(ctx context.Context, field graphql.Collected } res := resTmp.(*pb.Ref_Foo_Baz_Gz) fc.Result = res - return ec.marshalORef_Foo_Baz_Gz2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Baz_Gz(ctx, field.Selections, res) + return ec.marshalORef_Foo_Baz_Gz2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_Baz_Gz(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Ref_gz(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Ref", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "param1": + return ec.fieldContext_Ref_Foo_Baz_Gz_param1(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Ref_Foo_Baz_Gz", field.Name) + }, + } + return fc, nil } func (ec *executionContext) _Ref_Bar_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Bar) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_Bar_param1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Ref_Bar", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param1, nil @@ -5416,22 +6608,31 @@ func (ec *executionContext) _Ref_Bar_param1(ctx context.Context, field graphql.C return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Ref_Bar_param1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Ref_Bar", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Ref_Foo_bar1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_Foo_bar1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Ref_Foo", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Bar1, nil @@ -5445,26 +6646,39 @@ func (ec *executionContext) _Ref_Foo_bar1(ctx context.Context, field graphql.Col } res := resTmp.(*pb.Ref_Foo_Bar) fc.Result = res - return ec.marshalORef_Foo_Bar2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar(ctx, field.Selections, res) + return ec.marshalORef_Foo_Bar2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_Bar(ctx, field.Selections, res) } -func (ec *executionContext) _Ref_Foo_localTime2(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Ref_Foo_bar1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Ref_Foo", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "param1": + return ec.fieldContext_Ref_Foo_Bar_param1(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Ref_Foo_Bar", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Ref_Foo_localTime2(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_Foo_localTime2(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.LocalTime2, nil }) @@ -5477,25 +6691,38 @@ func (ec *executionContext) _Ref_Foo_localTime2(ctx context.Context, field graph } res := resTmp.(*pb.Timestamp) fc.Result = res - return ec.marshalOTimestamp2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐTimestamp(ctx, field.Selections, res) + return ec.marshalOTimestamp2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐTimestamp(ctx, field.Selections, res) } -func (ec *executionContext) _Ref_Foo_externalTime1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Ref_Foo_localTime2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Ref_Foo", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "time": + return ec.fieldContext_Timestamp_time(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Timestamp", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Ref_Foo_externalTime1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_Foo_externalTime1(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.ExternalTime1, nil @@ -5512,22 +6739,37 @@ func (ec *executionContext) _Ref_Foo_externalTime1(ctx context.Context, field gr return ec.marshalOGoogleProtobuf_Timestamp2ᚖgoogleᚗgolangᚗorgᚋprotobufᚋtypesᚋknownᚋtimestamppbᚐTimestamp(ctx, field.Selections, res) } -func (ec *executionContext) _Ref_Foo_bar2(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Ref_Foo_externalTime1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Ref_Foo", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "seconds": + return ec.fieldContext_GoogleProtobuf_Timestamp_seconds(ctx, field) + case "nanos": + return ec.fieldContext_GoogleProtobuf_Timestamp_nanos(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type GoogleProtobuf_Timestamp", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Ref_Foo_bar2(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_Foo_bar2(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Bar2, nil @@ -5541,25 +6783,38 @@ func (ec *executionContext) _Ref_Foo_bar2(ctx context.Context, field graphql.Col } res := resTmp.(*pb.Ref_Bar) fc.Result = res - return ec.marshalORef_Bar2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Bar(ctx, field.Selections, res) + return ec.marshalORef_Bar2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Bar(ctx, field.Selections, res) } -func (ec *executionContext) _Ref_Foo_en1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Ref_Foo_bar2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Ref_Foo", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "param1": + return ec.fieldContext_Ref_Bar_param1(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Ref_Bar", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Ref_Foo_en1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_Foo_en1(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.En1, nil @@ -5573,25 +6828,34 @@ func (ec *executionContext) _Ref_Foo_en1(ctx context.Context, field graphql.Coll } res := resTmp.(pb.Ref_Foo_En) fc.Result = res - return ec.marshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_En(ctx, field.Selections, res) + return ec.marshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_En(ctx, field.Selections, res) } -func (ec *executionContext) _Ref_Foo_en2(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Ref_Foo_en1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Ref_Foo", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Ref_Foo_En does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Ref_Foo_en2(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_Foo_en2(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.En2, nil @@ -5605,25 +6869,34 @@ func (ec *executionContext) _Ref_Foo_en2(ctx context.Context, field graphql.Coll } res := resTmp.(pb.Ref_Foo_Bar_En) fc.Result = res - return ec.marshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar_En(ctx, field.Selections, res) + return ec.marshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_Bar_En(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Ref_Foo_en2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Ref_Foo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Ref_Foo_Bar_En does not have child fields") + }, + } + return fc, nil } func (ec *executionContext) _Ref_Foo_Bar_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo_Bar) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_Foo_Bar_param1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Ref_Foo_Bar", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param1, nil @@ -5640,22 +6913,31 @@ func (ec *executionContext) _Ref_Foo_Bar_param1(ctx context.Context, field graph return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Ref_Foo_Bar_param1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Ref_Foo_Bar", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Ref_Foo_Baz_Gz_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo_Baz_Gz) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Ref_Foo_Baz_Gz_param1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Ref_Foo_Baz_Gz", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Param1, nil @@ -5672,22 +6954,31 @@ func (ec *executionContext) _Ref_Foo_Baz_Gz_param1(ctx context.Context, field gr return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Ref_Foo_Baz_Gz_param1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Ref_Foo_Baz_Gz", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Repeated_double(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_double(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Repeated", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Double, nil @@ -5704,22 +6995,31 @@ func (ec *executionContext) _Repeated_double(ctx context.Context, field graphql. return ec.marshalOFloat2ᚕfloat64ᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Repeated_float(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Repeated_double(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Repeated", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Repeated_float(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_float(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Float, nil @@ -5736,22 +7036,31 @@ func (ec *executionContext) _Repeated_float(ctx context.Context, field graphql.C return ec.marshalOFloat2ᚕfloat32ᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Repeated_int32(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Repeated_float(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Repeated", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Repeated_int32(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_int32(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Int32, nil @@ -5768,22 +7077,31 @@ func (ec *executionContext) _Repeated_int32(ctx context.Context, field graphql.C return ec.marshalOInt2ᚕint32ᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Repeated_int64(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Repeated_int32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Repeated", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Repeated_int64(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_int64(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Int64, nil @@ -5800,22 +7118,31 @@ func (ec *executionContext) _Repeated_int64(ctx context.Context, field graphql.C return ec.marshalOInt2ᚕint64ᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Repeated_uint32(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Repeated_int64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Repeated", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Repeated_uint32(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_uint32(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Uint32, nil @@ -5832,22 +7159,31 @@ func (ec *executionContext) _Repeated_uint32(ctx context.Context, field graphql. return ec.marshalOInt2ᚕuint32ᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Repeated_uint64(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Repeated_uint32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Repeated", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Repeated_uint64(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_uint64(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Uint64, nil @@ -5864,22 +7200,31 @@ func (ec *executionContext) _Repeated_uint64(ctx context.Context, field graphql. return ec.marshalOInt2ᚕuint64ᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Repeated_sint32(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Repeated_uint64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Repeated", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Repeated_sint32(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_sint32(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Sint32, nil @@ -5896,22 +7241,31 @@ func (ec *executionContext) _Repeated_sint32(ctx context.Context, field graphql. return ec.marshalOInt2ᚕint32ᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Repeated_sint64(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Repeated_sint32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Repeated", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Repeated_sint64(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_sint64(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Sint64, nil @@ -5928,22 +7282,31 @@ func (ec *executionContext) _Repeated_sint64(ctx context.Context, field graphql. return ec.marshalOInt2ᚕint64ᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Repeated_fixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Repeated_sint64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Repeated", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Repeated_fixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_fixed32(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fixed32, nil @@ -5960,22 +7323,31 @@ func (ec *executionContext) _Repeated_fixed32(ctx context.Context, field graphql return ec.marshalOInt2ᚕuint32ᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Repeated_fixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Repeated_fixed32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Repeated", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Repeated_fixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_fixed64(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fixed64, nil @@ -5992,22 +7364,31 @@ func (ec *executionContext) _Repeated_fixed64(ctx context.Context, field graphql return ec.marshalOInt2ᚕuint64ᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Repeated_sfixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Repeated_fixed64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Repeated", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Repeated_sfixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_sfixed32(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Sfixed32, nil @@ -6024,22 +7405,31 @@ func (ec *executionContext) _Repeated_sfixed32(ctx context.Context, field graphq return ec.marshalOInt2ᚕint32ᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Repeated_sfixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Repeated_sfixed32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Repeated", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Repeated_sfixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_sfixed64(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Sfixed64, nil @@ -6056,22 +7446,31 @@ func (ec *executionContext) _Repeated_sfixed64(ctx context.Context, field graphq return ec.marshalOInt2ᚕint64ᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Repeated_bool(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Repeated_sfixed64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Repeated", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Repeated_bool(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_bool(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Bool, nil @@ -6088,22 +7487,31 @@ func (ec *executionContext) _Repeated_bool(ctx context.Context, field graphql.Co return ec.marshalOBoolean2ᚕboolᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Repeated_stringX(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Repeated_bool(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Repeated", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Repeated_stringX(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_stringX(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.StringX, nil @@ -6120,22 +7528,31 @@ func (ec *executionContext) _Repeated_stringX(ctx context.Context, field graphql return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Repeated_bytes(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Repeated_stringX(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Repeated", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Repeated_bytes(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_bytes(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Bytes, nil @@ -6152,22 +7569,31 @@ func (ec *executionContext) _Repeated_bytes(ctx context.Context, field graphql.C return ec.marshalOBytes2ᚕᚕbyteᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Repeated_foo(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Repeated_bytes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Repeated", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Bytes does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Repeated_foo(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_foo(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Foo, nil @@ -6181,25 +7607,40 @@ func (ec *executionContext) _Repeated_foo(ctx context.Context, field graphql.Col } res := resTmp.([]*pb.Foo) fc.Result = res - return ec.marshalOFoo2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFooᚄ(ctx, field.Selections, res) + return ec.marshalOFoo2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFooᚄ(ctx, field.Selections, res) } -func (ec *executionContext) _Repeated_bar(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Repeated_foo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Repeated", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "param1": + return ec.fieldContext_Foo_param1(ctx, field) + case "param2": + return ec.fieldContext_Foo_param2(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Foo", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) _Repeated_bar(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Repeated_bar(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Bar, nil @@ -6213,25 +7654,34 @@ func (ec *executionContext) _Repeated_bar(ctx context.Context, field graphql.Col } res := resTmp.([]pb.Bar) fc.Result = res - return ec.marshalOBar2ᚕgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBarᚄ(ctx, field.Selections, res) + return ec.marshalOBar2ᚕgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBarᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Repeated_bar(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Repeated", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Bar does not have child fields") + }, + } + return fc, nil } func (ec *executionContext) _Scalars_double(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Scalars_double(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Scalars", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Double, nil @@ -6248,22 +7698,31 @@ func (ec *executionContext) _Scalars_double(ctx context.Context, field graphql.C return ec.marshalOFloat2float64(ctx, field.Selections, res) } -func (ec *executionContext) _Scalars_float(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Scalars_double(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Scalars", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Scalars_float(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Scalars_float(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Float, nil @@ -6280,22 +7739,31 @@ func (ec *executionContext) _Scalars_float(ctx context.Context, field graphql.Co return ec.marshalOFloat2float32(ctx, field.Selections, res) } -func (ec *executionContext) _Scalars_int32(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Scalars_float(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Scalars", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Scalars_int32(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Scalars_int32(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Int32, nil @@ -6312,22 +7780,31 @@ func (ec *executionContext) _Scalars_int32(ctx context.Context, field graphql.Co return ec.marshalOInt2int32(ctx, field.Selections, res) } -func (ec *executionContext) _Scalars_int64(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Scalars_int32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Scalars", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Scalars_int64(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Scalars_int64(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Int64, nil @@ -6344,28 +7821,37 @@ func (ec *executionContext) _Scalars_int64(ctx context.Context, field graphql.Co return ec.marshalOInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) _Scalars_uint32(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Scalars_int64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Scalars", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Uint32, nil - }) +func (ec *executionContext) _Scalars_uint32(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Scalars_uint32(ctx, field) if err != nil { - ec.Error(ctx, err) + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Uint32, nil + }) + if err != nil { + ec.Error(ctx, err) return graphql.Null } if resTmp == nil { @@ -6376,22 +7862,31 @@ func (ec *executionContext) _Scalars_uint32(ctx context.Context, field graphql.C return ec.marshalOInt2uint32(ctx, field.Selections, res) } -func (ec *executionContext) _Scalars_uint64(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Scalars_uint32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Scalars", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Scalars_uint64(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Scalars_uint64(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Uint64, nil @@ -6408,22 +7903,31 @@ func (ec *executionContext) _Scalars_uint64(ctx context.Context, field graphql.C return ec.marshalOInt2uint64(ctx, field.Selections, res) } -func (ec *executionContext) _Scalars_sint32(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Scalars_uint64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Scalars", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Scalars_sint32(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Scalars_sint32(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Sint32, nil @@ -6440,22 +7944,31 @@ func (ec *executionContext) _Scalars_sint32(ctx context.Context, field graphql.C return ec.marshalOInt2int32(ctx, field.Selections, res) } -func (ec *executionContext) _Scalars_sint64(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Scalars_sint32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Scalars", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Scalars_sint64(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Scalars_sint64(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Sint64, nil @@ -6472,22 +7985,31 @@ func (ec *executionContext) _Scalars_sint64(ctx context.Context, field graphql.C return ec.marshalOInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) _Scalars_fixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Scalars_sint64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Scalars", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Scalars_fixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Scalars_fixed32(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fixed32, nil @@ -6504,22 +8026,31 @@ func (ec *executionContext) _Scalars_fixed32(ctx context.Context, field graphql. return ec.marshalOInt2uint32(ctx, field.Selections, res) } -func (ec *executionContext) _Scalars_fixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Scalars_fixed32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Scalars", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Scalars_fixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Scalars_fixed64(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Fixed64, nil @@ -6536,22 +8067,31 @@ func (ec *executionContext) _Scalars_fixed64(ctx context.Context, field graphql. return ec.marshalOInt2uint64(ctx, field.Selections, res) } -func (ec *executionContext) _Scalars_sfixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Scalars_fixed64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Scalars", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Scalars_sfixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Scalars_sfixed32(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Sfixed32, nil @@ -6568,22 +8108,31 @@ func (ec *executionContext) _Scalars_sfixed32(ctx context.Context, field graphql return ec.marshalOInt2int32(ctx, field.Selections, res) } -func (ec *executionContext) _Scalars_sfixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Scalars_sfixed32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Scalars", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Scalars_sfixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Scalars_sfixed64(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Sfixed64, nil @@ -6600,22 +8149,31 @@ func (ec *executionContext) _Scalars_sfixed64(ctx context.Context, field graphql return ec.marshalOInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) _Scalars_bool(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Scalars_sfixed64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Scalars", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Scalars_bool(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Scalars_bool(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Bool, nil @@ -6632,22 +8190,31 @@ func (ec *executionContext) _Scalars_bool(ctx context.Context, field graphql.Col return ec.marshalOBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) _Scalars_stringX(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Scalars_bool(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Scalars", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Scalars_stringX(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Scalars_stringX(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.StringX, nil @@ -6664,22 +8231,31 @@ func (ec *executionContext) _Scalars_stringX(ctx context.Context, field graphql. return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) _Scalars_bytes(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Scalars_stringX(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Scalars", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Scalars_bytes(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Scalars_bytes(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Bytes, nil @@ -6696,22 +8272,31 @@ func (ec *executionContext) _Scalars_bytes(ctx context.Context, field graphql.Co return ec.marshalOBytes2ᚕbyte(ctx, field.Selections, res) } -func (ec *executionContext) _Scalars_stringOptional(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext_Scalars_bytes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "Scalars", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Bytes does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) _Scalars_stringOptional(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Scalars_stringOptional(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.StringOptional, nil @@ -6728,22 +8313,31 @@ func (ec *executionContext) _Scalars_stringOptional(ctx context.Context, field g return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Scalars_stringOptional(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Scalars", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Timestamp_time(ctx context.Context, field graphql.CollectedField, obj *pb.Timestamp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Timestamp_time(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "Timestamp", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Time, nil @@ -6760,22 +8354,31 @@ func (ec *executionContext) _Timestamp_time(ctx context.Context, field graphql.C return ec.marshalOString2string(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext_Timestamp_time(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Timestamp", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__Directive", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -6795,25 +8398,34 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Directive", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_description(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description, nil + return obj.Description(), nil }) if err != nil { ec.Error(ctx, err) @@ -6822,27 +8434,36 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_locations(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__Directive", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Locations, nil @@ -6862,22 +8483,31 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Directive", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type __DirectiveLocation does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_args(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -6897,22 +8527,85 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { +func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__EnumValue", + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsRepeatable, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_name(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -6932,25 +8625,34 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_description(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description, nil + return obj.Description(), nil }) if err != nil { ec.Error(ctx, err) @@ -6959,27 +8661,36 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -6999,22 +8710,31 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -7031,22 +8751,31 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -7066,25 +8795,34 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Field", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_description(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description, nil + return obj.Description(), nil }) if err != nil { ec.Error(ctx, err) @@ -7093,27 +8831,36 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap if resTmp == nil { return graphql.Null } - res := resTmp.(string) - fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_args(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Args, nil @@ -7133,22 +8880,41 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Field", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_type(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -7168,22 +8934,53 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_isDeprecated(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.IsDeprecated(), nil @@ -7203,22 +9000,31 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Field", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_deprecationReason(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DeprecationReason(), nil @@ -7235,22 +9041,31 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__InputValue", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name, nil @@ -7270,25 +9085,34 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_description(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description, nil + return obj.Description(), nil }) if err != nil { ec.Error(ctx, err) @@ -7297,27 +9121,36 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__InputValue", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Type, nil @@ -7337,22 +9170,53 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, - Args: nil, IsMethod: false, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.DefaultValue, nil @@ -7369,22 +9233,72 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { +func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Schema", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_types(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Types(), nil @@ -7404,22 +9318,53 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Schema", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_queryType(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.QueryType(), nil @@ -7439,22 +9384,53 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Schema", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_mutationType(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.MutationType(), nil @@ -7471,22 +9447,53 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Schema", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.SubscriptionType(), nil @@ -7503,22 +9510,53 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_directives(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__Schema", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Directives(), nil @@ -7538,22 +9576,43 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___Directive_name(ctx, field) + case "description": + return ec.fieldContext___Directive_description(ctx, field) + case "locations": + return ec.fieldContext___Directive_locations(ctx, field) + case "args": + return ec.fieldContext___Directive_args(ctx, field) + case "isRepeatable": + return ec.fieldContext___Directive_isRepeatable(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_kind(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Kind(), nil @@ -7573,22 +9632,31 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Type", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type __TypeKind does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_name(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Name(), nil @@ -7605,22 +9673,31 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Type", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} +func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_description(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Description(), nil @@ -7632,37 +9709,39 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Type", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, } + return fc, nil +} - ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field___Type_fields_args(ctx, rawArgs) +func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_fields(ctx, field) if err != nil { - ec.Error(ctx, err) return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Fields(args["includeDeprecated"].(bool)), nil + return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil }) if err != nil { ec.Error(ctx, err) @@ -7676,22 +9755,56 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Type", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___Field_name(ctx, field) + case "description": + return ec.fieldContext___Field_description(ctx, field) + case "args": + return ec.fieldContext___Field_args(ctx, field) + case "type": + return ec.fieldContext___Field_type(ctx, field) + case "isDeprecated": + return ec.fieldContext___Field_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___Field_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return } + return fc, nil +} +func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_interfaces(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.Interfaces(), nil @@ -7708,22 +9821,53 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Type", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_possibleTypes(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.PossibleTypes(), nil @@ -7740,32 +9884,56 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Type", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, } + return fc, nil +} - ctx = graphql.WithFieldContext(ctx, fc) - rawArgs := field.ArgumentMap(ec.Variables) - args, err := ec.field___Type_enumValues_args(ctx, rawArgs) +func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_enumValues(ctx, field) if err != nil { - ec.Error(ctx, err) return graphql.Null } - fc.Args = args + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EnumValues(args["includeDeprecated"].(bool)), nil + return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil }) if err != nil { ec.Error(ctx, err) @@ -7779,22 +9947,52 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ +func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Type", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___EnumValue_name(ctx, field) + case "description": + return ec.fieldContext___EnumValue_description(ctx, field) + case "isDeprecated": + return ec.fieldContext___EnumValue_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___EnumValue_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return } + return fc, nil +} +func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_inputFields(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children return obj.InputFields(), nil @@ -7811,25 +10009,107 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } +func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_ofType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) ret = graphql.Null } }() - fc := &graphql.FieldContext{ + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.OfType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ Object: "__Type", Field: field, - Args: nil, IsMethod: true, IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, } + return fc, nil +} +func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field) + if err != nil { + return graphql.Null + } ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.OfType(), nil + return obj.SpecifiedByURL(), nil }) if err != nil { ec.Error(ctx, err) @@ -7838,9 +10118,22 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co if resTmp == nil { return graphql.Null } - res := resTmp.(*introspection.Type) + res := resTmp.(*string) fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil } // endregion **************************** field.gotpl ***************************** @@ -7849,9 +10142,17 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co func (ec *executionContext) unmarshalInputBazInput(ctx context.Context, obj interface{}) (pb.Baz, error) { var it pb.Baz - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"param1"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "param1": var err error @@ -7869,9 +10170,17 @@ func (ec *executionContext) unmarshalInputBazInput(ctx context.Context, obj inte func (ec *executionContext) unmarshalInputFooInput(ctx context.Context, obj interface{}) (pb.Foo, error) { var it pb.Foo - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"param1", "param2"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "param1": var err error @@ -7897,9 +10206,17 @@ func (ec *executionContext) unmarshalInputFooInput(ctx context.Context, obj inte func (ec *executionContext) unmarshalInputFoo_Foo2Input(ctx context.Context, obj interface{}) (pb.Foo_Foo2, error) { var it pb.Foo_Foo2 - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"param1"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "param1": var err error @@ -7917,9 +10234,17 @@ func (ec *executionContext) unmarshalInputFoo_Foo2Input(ctx context.Context, obj func (ec *executionContext) unmarshalInputGoogleProtobuf_TimestampInput(ctx context.Context, obj interface{}) (timestamppb.Timestamp, error) { var it timestamppb.Timestamp - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"seconds", "nanos"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "seconds": var err error @@ -7945,15 +10270,23 @@ func (ec *executionContext) unmarshalInputGoogleProtobuf_TimestampInput(ctx cont func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj interface{}) (pb.Maps, error) { var it pb.Maps - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"int32Int32", "int64Int64", "uint32Uint32", "uint64Uint64", "sint32Sint32", "sint64Sint64", "fixed32Fixed32", "fixed64Fixed64", "sfixed32Sfixed32", "sfixed64Sfixed64", "boolBool", "stringString", "stringBytes", "stringFloat", "stringDouble", "stringFoo", "stringBar"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "int32Int32": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("int32Int32")) - data, err := ec.unmarshalOMaps_Int32Int32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int32Int32Entryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_Int32Int32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Int32Int32Entryᚄ(ctx, v) if err != nil { return it, err } @@ -7964,7 +10297,7 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("int64Int64")) - data, err := ec.unmarshalOMaps_Int64Int64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int64Int64Entryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_Int64Int64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Int64Int64Entryᚄ(ctx, v) if err != nil { return it, err } @@ -7975,7 +10308,7 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("uint32Uint32")) - data, err := ec.unmarshalOMaps_Uint32Uint32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint32Uint32Entryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_Uint32Uint32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Uint32Uint32Entryᚄ(ctx, v) if err != nil { return it, err } @@ -7986,7 +10319,7 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("uint64Uint64")) - data, err := ec.unmarshalOMaps_Uint64Uint64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint64Uint64Entryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_Uint64Uint64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Uint64Uint64Entryᚄ(ctx, v) if err != nil { return it, err } @@ -7997,7 +10330,7 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sint32Sint32")) - data, err := ec.unmarshalOMaps_Sint32Sint32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint32Sint32Entryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_Sint32Sint32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sint32Sint32Entryᚄ(ctx, v) if err != nil { return it, err } @@ -8008,7 +10341,7 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sint64Sint64")) - data, err := ec.unmarshalOMaps_Sint64Sint64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint64Sint64Entryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_Sint64Sint64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sint64Sint64Entryᚄ(ctx, v) if err != nil { return it, err } @@ -8019,7 +10352,7 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fixed32Fixed32")) - data, err := ec.unmarshalOMaps_Fixed32Fixed32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed32Fixed32Entryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_Fixed32Fixed32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Fixed32Fixed32Entryᚄ(ctx, v) if err != nil { return it, err } @@ -8030,7 +10363,7 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fixed64Fixed64")) - data, err := ec.unmarshalOMaps_Fixed64Fixed64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed64Fixed64Entryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_Fixed64Fixed64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Fixed64Fixed64Entryᚄ(ctx, v) if err != nil { return it, err } @@ -8041,7 +10374,7 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sfixed32Sfixed32")) - data, err := ec.unmarshalOMaps_Sfixed32Sfixed32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed32Sfixed32Entryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_Sfixed32Sfixed32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sfixed32Sfixed32Entryᚄ(ctx, v) if err != nil { return it, err } @@ -8052,7 +10385,7 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sfixed64Sfixed64")) - data, err := ec.unmarshalOMaps_Sfixed64Sfixed64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed64Sfixed64Entryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_Sfixed64Sfixed64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sfixed64Sfixed64Entryᚄ(ctx, v) if err != nil { return it, err } @@ -8063,7 +10396,7 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("boolBool")) - data, err := ec.unmarshalOMaps_BoolBoolEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_BoolBoolEntryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_BoolBoolEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_BoolBoolEntryᚄ(ctx, v) if err != nil { return it, err } @@ -8074,7 +10407,7 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stringString")) - data, err := ec.unmarshalOMaps_StringStringEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringStringEntryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_StringStringEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringStringEntryᚄ(ctx, v) if err != nil { return it, err } @@ -8085,7 +10418,7 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stringBytes")) - data, err := ec.unmarshalOMaps_StringBytesEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBytesEntryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_StringBytesEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringBytesEntryᚄ(ctx, v) if err != nil { return it, err } @@ -8096,7 +10429,7 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stringFloat")) - data, err := ec.unmarshalOMaps_StringFloatEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFloatEntryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_StringFloatEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringFloatEntryᚄ(ctx, v) if err != nil { return it, err } @@ -8107,7 +10440,7 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stringDouble")) - data, err := ec.unmarshalOMaps_StringDoubleEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringDoubleEntryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_StringDoubleEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringDoubleEntryᚄ(ctx, v) if err != nil { return it, err } @@ -8118,7 +10451,7 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stringFoo")) - data, err := ec.unmarshalOMaps_StringFooEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFooEntryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_StringFooEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringFooEntryᚄ(ctx, v) if err != nil { return it, err } @@ -8129,7 +10462,7 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stringBar")) - data, err := ec.unmarshalOMaps_StringBarEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBarEntryᚄ(ctx, v) + data, err := ec.unmarshalOMaps_StringBarEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringBarEntryᚄ(ctx, v) if err != nil { return it, err } @@ -8144,9 +10477,17 @@ func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj int func (ec *executionContext) unmarshalInputMaps_BoolBoolEntryInput(ctx context.Context, obj interface{}) (pb.Maps_BoolBoolEntry, error) { var it pb.Maps_BoolBoolEntry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8172,9 +10513,17 @@ func (ec *executionContext) unmarshalInputMaps_BoolBoolEntryInput(ctx context.Co func (ec *executionContext) unmarshalInputMaps_Fixed32Fixed32EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Fixed32Fixed32Entry, error) { var it pb.Maps_Fixed32Fixed32Entry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8200,9 +10549,17 @@ func (ec *executionContext) unmarshalInputMaps_Fixed32Fixed32EntryInput(ctx cont func (ec *executionContext) unmarshalInputMaps_Fixed64Fixed64EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Fixed64Fixed64Entry, error) { var it pb.Maps_Fixed64Fixed64Entry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8228,9 +10585,17 @@ func (ec *executionContext) unmarshalInputMaps_Fixed64Fixed64EntryInput(ctx cont func (ec *executionContext) unmarshalInputMaps_Int32Int32EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Int32Int32Entry, error) { var it pb.Maps_Int32Int32Entry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8256,9 +10621,17 @@ func (ec *executionContext) unmarshalInputMaps_Int32Int32EntryInput(ctx context. func (ec *executionContext) unmarshalInputMaps_Int64Int64EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Int64Int64Entry, error) { var it pb.Maps_Int64Int64Entry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8284,9 +10657,17 @@ func (ec *executionContext) unmarshalInputMaps_Int64Int64EntryInput(ctx context. func (ec *executionContext) unmarshalInputMaps_Sfixed32Sfixed32EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Sfixed32Sfixed32Entry, error) { var it pb.Maps_Sfixed32Sfixed32Entry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8312,9 +10693,17 @@ func (ec *executionContext) unmarshalInputMaps_Sfixed32Sfixed32EntryInput(ctx co func (ec *executionContext) unmarshalInputMaps_Sfixed64Sfixed64EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Sfixed64Sfixed64Entry, error) { var it pb.Maps_Sfixed64Sfixed64Entry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8340,9 +10729,17 @@ func (ec *executionContext) unmarshalInputMaps_Sfixed64Sfixed64EntryInput(ctx co func (ec *executionContext) unmarshalInputMaps_Sint32Sint32EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Sint32Sint32Entry, error) { var it pb.Maps_Sint32Sint32Entry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8368,9 +10765,17 @@ func (ec *executionContext) unmarshalInputMaps_Sint32Sint32EntryInput(ctx contex func (ec *executionContext) unmarshalInputMaps_Sint64Sint64EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Sint64Sint64Entry, error) { var it pb.Maps_Sint64Sint64Entry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8396,9 +10801,17 @@ func (ec *executionContext) unmarshalInputMaps_Sint64Sint64EntryInput(ctx contex func (ec *executionContext) unmarshalInputMaps_StringBarEntryInput(ctx context.Context, obj interface{}) (pb.Maps_StringBarEntry, error) { var it pb.Maps_StringBarEntry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8412,7 +10825,7 @@ func (ec *executionContext) unmarshalInputMaps_StringBarEntryInput(ctx context.C var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) - it.Value, err = ec.unmarshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx, v) + it.Value, err = ec.unmarshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBar(ctx, v) if err != nil { return it, err } @@ -8424,9 +10837,17 @@ func (ec *executionContext) unmarshalInputMaps_StringBarEntryInput(ctx context.C func (ec *executionContext) unmarshalInputMaps_StringBytesEntryInput(ctx context.Context, obj interface{}) (pb.Maps_StringBytesEntry, error) { var it pb.Maps_StringBytesEntry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8452,9 +10873,17 @@ func (ec *executionContext) unmarshalInputMaps_StringBytesEntryInput(ctx context func (ec *executionContext) unmarshalInputMaps_StringDoubleEntryInput(ctx context.Context, obj interface{}) (pb.Maps_StringDoubleEntry, error) { var it pb.Maps_StringDoubleEntry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8480,9 +10909,17 @@ func (ec *executionContext) unmarshalInputMaps_StringDoubleEntryInput(ctx contex func (ec *executionContext) unmarshalInputMaps_StringFloatEntryInput(ctx context.Context, obj interface{}) (pb.Maps_StringFloatEntry, error) { var it pb.Maps_StringFloatEntry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8508,9 +10945,17 @@ func (ec *executionContext) unmarshalInputMaps_StringFloatEntryInput(ctx context func (ec *executionContext) unmarshalInputMaps_StringFooEntryInput(ctx context.Context, obj interface{}) (pb.Maps_StringFooEntry, error) { var it pb.Maps_StringFooEntry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8524,7 +10969,7 @@ func (ec *executionContext) unmarshalInputMaps_StringFooEntryInput(ctx context.C var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) - it.Value, err = ec.unmarshalOFooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx, v) + it.Value, err = ec.unmarshalOFooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo(ctx, v) if err != nil { return it, err } @@ -8536,9 +10981,17 @@ func (ec *executionContext) unmarshalInputMaps_StringFooEntryInput(ctx context.C func (ec *executionContext) unmarshalInputMaps_StringStringEntryInput(ctx context.Context, obj interface{}) (pb.Maps_StringStringEntry, error) { var it pb.Maps_StringStringEntry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8564,9 +11017,17 @@ func (ec *executionContext) unmarshalInputMaps_StringStringEntryInput(ctx contex func (ec *executionContext) unmarshalInputMaps_Uint32Uint32EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Uint32Uint32Entry, error) { var it pb.Maps_Uint32Uint32Entry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8592,9 +11053,17 @@ func (ec *executionContext) unmarshalInputMaps_Uint32Uint32EntryInput(ctx contex func (ec *executionContext) unmarshalInputMaps_Uint64Uint64EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Uint64Uint64Entry, error) { var it pb.Maps_Uint64Uint64Entry - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"key", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "key": var err error @@ -8620,9 +11089,17 @@ func (ec *executionContext) unmarshalInputMaps_Uint64Uint64EntryInput(ctx contex func (ec *executionContext) unmarshalInputOneofInput(ctx context.Context, obj interface{}) (pb.Oneof, error) { var it pb.Oneof - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"param1", "param2", "param3", "param4", "param5", "param6"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "param1": var err error @@ -8760,15 +11237,23 @@ func (ec *executionContext) unmarshalInputOneofInput(ctx context.Context, obj in func (ec *executionContext) unmarshalInputRefInput(ctx context.Context, obj interface{}) (pb.Ref, error) { var it pb.Ref - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"localTime2", "external", "localTime", "file", "fileMsg", "fileEnum", "local", "foreign", "en1", "en2", "gz"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "localTime2": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("localTime2")) - it.LocalTime2, err = ec.unmarshalOTimestampInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐTimestamp(ctx, v) + it.LocalTime2, err = ec.unmarshalOTimestampInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐTimestamp(ctx, v) if err != nil { return it, err } @@ -8784,7 +11269,7 @@ func (ec *executionContext) unmarshalInputRefInput(ctx context.Context, obj inte var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("localTime")) - it.LocalTime, err = ec.unmarshalOTimestampInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐTimestamp(ctx, v) + it.LocalTime, err = ec.unmarshalOTimestampInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐTimestamp(ctx, v) if err != nil { return it, err } @@ -8792,7 +11277,7 @@ func (ec *executionContext) unmarshalInputRefInput(ctx context.Context, obj inte var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("file")) - it.File, err = ec.unmarshalOBazInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBaz(ctx, v) + it.File, err = ec.unmarshalOBazInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBaz(ctx, v) if err != nil { return it, err } @@ -8800,7 +11285,7 @@ func (ec *executionContext) unmarshalInputRefInput(ctx context.Context, obj inte var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fileMsg")) - it.FileMsg, err = ec.unmarshalOFooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx, v) + it.FileMsg, err = ec.unmarshalOFooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo(ctx, v) if err != nil { return it, err } @@ -8808,7 +11293,7 @@ func (ec *executionContext) unmarshalInputRefInput(ctx context.Context, obj inte var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fileEnum")) - it.FileEnum, err = ec.unmarshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx, v) + it.FileEnum, err = ec.unmarshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBar(ctx, v) if err != nil { return it, err } @@ -8816,7 +11301,7 @@ func (ec *executionContext) unmarshalInputRefInput(ctx context.Context, obj inte var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("local")) - it.Local, err = ec.unmarshalORef_FooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo(ctx, v) + it.Local, err = ec.unmarshalORef_FooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo(ctx, v) if err != nil { return it, err } @@ -8824,7 +11309,7 @@ func (ec *executionContext) unmarshalInputRefInput(ctx context.Context, obj inte var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("foreign")) - it.Foreign, err = ec.unmarshalOFoo_Foo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo_Foo2(ctx, v) + it.Foreign, err = ec.unmarshalOFoo_Foo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo_Foo2(ctx, v) if err != nil { return it, err } @@ -8832,7 +11317,7 @@ func (ec *executionContext) unmarshalInputRefInput(ctx context.Context, obj inte var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("en1")) - it.En1, err = ec.unmarshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_En(ctx, v) + it.En1, err = ec.unmarshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_En(ctx, v) if err != nil { return it, err } @@ -8840,7 +11325,7 @@ func (ec *executionContext) unmarshalInputRefInput(ctx context.Context, obj inte var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("en2")) - it.En2, err = ec.unmarshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar_En(ctx, v) + it.En2, err = ec.unmarshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_Bar_En(ctx, v) if err != nil { return it, err } @@ -8848,7 +11333,7 @@ func (ec *executionContext) unmarshalInputRefInput(ctx context.Context, obj inte var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gz")) - it.Gz, err = ec.unmarshalORef_Foo_Baz_GzInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Baz_Gz(ctx, v) + it.Gz, err = ec.unmarshalORef_Foo_Baz_GzInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_Baz_Gz(ctx, v) if err != nil { return it, err } @@ -8860,9 +11345,17 @@ func (ec *executionContext) unmarshalInputRefInput(ctx context.Context, obj inte func (ec *executionContext) unmarshalInputRef_BarInput(ctx context.Context, obj interface{}) (pb.Ref_Bar, error) { var it pb.Ref_Bar - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"param1"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "param1": var err error @@ -8880,15 +11373,23 @@ func (ec *executionContext) unmarshalInputRef_BarInput(ctx context.Context, obj func (ec *executionContext) unmarshalInputRef_FooInput(ctx context.Context, obj interface{}) (pb.Ref_Foo, error) { var it pb.Ref_Foo - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"bar1", "localTime2", "externalTime1", "bar2", "en1", "en2"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "bar1": var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bar1")) - it.Bar1, err = ec.unmarshalORef_Foo_BarInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar(ctx, v) + it.Bar1, err = ec.unmarshalORef_Foo_BarInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_Bar(ctx, v) if err != nil { return it, err } @@ -8896,7 +11397,7 @@ func (ec *executionContext) unmarshalInputRef_FooInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("localTime2")) - it.LocalTime2, err = ec.unmarshalOTimestampInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐTimestamp(ctx, v) + it.LocalTime2, err = ec.unmarshalOTimestampInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐTimestamp(ctx, v) if err != nil { return it, err } @@ -8912,7 +11413,7 @@ func (ec *executionContext) unmarshalInputRef_FooInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bar2")) - it.Bar2, err = ec.unmarshalORef_BarInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Bar(ctx, v) + it.Bar2, err = ec.unmarshalORef_BarInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Bar(ctx, v) if err != nil { return it, err } @@ -8920,7 +11421,7 @@ func (ec *executionContext) unmarshalInputRef_FooInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("en1")) - it.En1, err = ec.unmarshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_En(ctx, v) + it.En1, err = ec.unmarshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_En(ctx, v) if err != nil { return it, err } @@ -8928,7 +11429,7 @@ func (ec *executionContext) unmarshalInputRef_FooInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("en2")) - it.En2, err = ec.unmarshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar_En(ctx, v) + it.En2, err = ec.unmarshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_Bar_En(ctx, v) if err != nil { return it, err } @@ -8940,9 +11441,17 @@ func (ec *executionContext) unmarshalInputRef_FooInput(ctx context.Context, obj func (ec *executionContext) unmarshalInputRef_Foo_BarInput(ctx context.Context, obj interface{}) (pb.Ref_Foo_Bar, error) { var it pb.Ref_Foo_Bar - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"param1"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "param1": var err error @@ -8960,9 +11469,17 @@ func (ec *executionContext) unmarshalInputRef_Foo_BarInput(ctx context.Context, func (ec *executionContext) unmarshalInputRef_Foo_Baz_GzInput(ctx context.Context, obj interface{}) (pb.Ref_Foo_Baz_Gz, error) { var it pb.Ref_Foo_Baz_Gz - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"param1"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "param1": var err error @@ -8980,9 +11497,17 @@ func (ec *executionContext) unmarshalInputRef_Foo_Baz_GzInput(ctx context.Contex func (ec *executionContext) unmarshalInputRepeatedInput(ctx context.Context, obj interface{}) (pb.Repeated, error) { var it pb.Repeated - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"double", "float", "int32", "int64", "uint32", "uint64", "sint32", "sint64", "fixed32", "fixed64", "sfixed32", "sfixed64", "bool", "stringX", "bytes", "foo", "bar"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "double": var err error @@ -9108,7 +11633,7 @@ func (ec *executionContext) unmarshalInputRepeatedInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("foo")) - it.Foo, err = ec.unmarshalOFooInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFooᚄ(ctx, v) + it.Foo, err = ec.unmarshalOFooInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFooᚄ(ctx, v) if err != nil { return it, err } @@ -9116,7 +11641,7 @@ func (ec *executionContext) unmarshalInputRepeatedInput(ctx context.Context, obj var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bar")) - it.Bar, err = ec.unmarshalOBar2ᚕgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBarᚄ(ctx, v) + it.Bar, err = ec.unmarshalOBar2ᚕgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBarᚄ(ctx, v) if err != nil { return it, err } @@ -9128,9 +11653,17 @@ func (ec *executionContext) unmarshalInputRepeatedInput(ctx context.Context, obj func (ec *executionContext) unmarshalInputScalarsInput(ctx context.Context, obj interface{}) (pb.Scalars, error) { var it pb.Scalars - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"double", "float", "int32", "int64", "uint32", "uint64", "sint32", "sint64", "fixed32", "fixed64", "sfixed32", "sfixed64", "bool", "stringX", "bytes", "stringOptional"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "double": var err error @@ -9268,9 +11801,17 @@ func (ec *executionContext) unmarshalInputScalarsInput(ctx context.Context, obj func (ec *executionContext) unmarshalInputTimestampInput(ctx context.Context, obj interface{}) (pb.Timestamp, error) { var it pb.Timestamp - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } - for k, v := range asMap { + fieldsInOrder := [...]string{"time"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } switch k { case "time": var err error @@ -9360,7 +11901,6 @@ var bazImplementors = []string{"Baz"} func (ec *executionContext) _Baz(ctx context.Context, sel ast.SelectionSet, obj *pb.Baz) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, bazImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9368,7 +11908,9 @@ func (ec *executionContext) _Baz(ctx context.Context, sel ast.SelectionSet, obj case "__typename": out.Values[i] = graphql.MarshalString("Baz") case "param1": + out.Values[i] = ec._Baz_param1(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9384,7 +11926,6 @@ var fooImplementors = []string{"Foo"} func (ec *executionContext) _Foo(ctx context.Context, sel ast.SelectionSet, obj *pb.Foo) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, fooImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9392,9 +11933,13 @@ func (ec *executionContext) _Foo(ctx context.Context, sel ast.SelectionSet, obj case "__typename": out.Values[i] = graphql.MarshalString("Foo") case "param1": + out.Values[i] = ec._Foo_param1(ctx, field, obj) + case "param2": + out.Values[i] = ec._Foo_param2(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9410,7 +11955,6 @@ var foo_Foo2Implementors = []string{"Foo_Foo2"} func (ec *executionContext) _Foo_Foo2(ctx context.Context, sel ast.SelectionSet, obj *pb.Foo_Foo2) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, foo_Foo2Implementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9418,7 +11962,9 @@ func (ec *executionContext) _Foo_Foo2(ctx context.Context, sel ast.SelectionSet, case "__typename": out.Values[i] = graphql.MarshalString("Foo_Foo2") case "param1": + out.Values[i] = ec._Foo_Foo2_param1(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9434,7 +11980,6 @@ var googleProtobuf_TimestampImplementors = []string{"GoogleProtobuf_Timestamp"} func (ec *executionContext) _GoogleProtobuf_Timestamp(ctx context.Context, sel ast.SelectionSet, obj *timestamppb.Timestamp) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, googleProtobuf_TimestampImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9442,9 +11987,13 @@ func (ec *executionContext) _GoogleProtobuf_Timestamp(ctx context.Context, sel a case "__typename": out.Values[i] = graphql.MarshalString("GoogleProtobuf_Timestamp") case "seconds": + out.Values[i] = ec._GoogleProtobuf_Timestamp_seconds(ctx, field, obj) + case "nanos": + out.Values[i] = ec._GoogleProtobuf_Timestamp_nanos(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9460,7 +12009,6 @@ var mapsImplementors = []string{"Maps"} func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, mapsImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9469,7 +12017,8 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj out.Values[i] = graphql.MarshalString("Maps") case "int32Int32": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9477,10 +12026,16 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_int32Int32(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "int64Int64": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9488,10 +12043,16 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_int64Int64(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "uint32Uint32": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9499,10 +12060,16 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_uint32Uint32(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "uint64Uint64": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9510,10 +12077,16 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_uint64Uint64(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "sint32Sint32": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9521,10 +12094,16 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_sint32Sint32(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "sint64Sint64": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9532,10 +12111,16 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_sint64Sint64(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "fixed32Fixed32": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9543,10 +12128,16 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_fixed32Fixed32(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "fixed64Fixed64": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9554,10 +12145,16 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_fixed64Fixed64(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "sfixed32Sfixed32": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9565,10 +12162,16 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_sfixed32Sfixed32(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "sfixed64Sfixed64": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9576,10 +12179,16 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_sfixed64Sfixed64(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "boolBool": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9587,10 +12196,16 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_boolBool(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "stringString": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9598,10 +12213,16 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_stringString(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "stringBytes": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9609,10 +12230,16 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_stringBytes(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "stringFloat": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9620,10 +12247,16 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_stringFloat(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "stringDouble": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9631,10 +12264,16 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_stringDouble(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "stringFoo": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9642,10 +12281,16 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_stringFoo(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "stringBar": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -9653,6 +12298,11 @@ func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj }() res = ec._Maps_stringBar(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) default: panic("unknown field " + strconv.Quote(field.Name)) @@ -9669,7 +12319,6 @@ var maps_BoolBoolEntryImplementors = []string{"Maps_BoolBoolEntry"} func (ec *executionContext) _Maps_BoolBoolEntry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_BoolBoolEntry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_BoolBoolEntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9677,9 +12326,13 @@ func (ec *executionContext) _Maps_BoolBoolEntry(ctx context.Context, sel ast.Sel case "__typename": out.Values[i] = graphql.MarshalString("Maps_BoolBoolEntry") case "key": + out.Values[i] = ec._Maps_BoolBoolEntry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_BoolBoolEntry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9695,7 +12348,6 @@ var maps_Fixed32Fixed32EntryImplementors = []string{"Maps_Fixed32Fixed32Entry"} func (ec *executionContext) _Maps_Fixed32Fixed32Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Fixed32Fixed32Entry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_Fixed32Fixed32EntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9703,9 +12355,13 @@ func (ec *executionContext) _Maps_Fixed32Fixed32Entry(ctx context.Context, sel a case "__typename": out.Values[i] = graphql.MarshalString("Maps_Fixed32Fixed32Entry") case "key": + out.Values[i] = ec._Maps_Fixed32Fixed32Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Fixed32Fixed32Entry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9721,7 +12377,6 @@ var maps_Fixed64Fixed64EntryImplementors = []string{"Maps_Fixed64Fixed64Entry"} func (ec *executionContext) _Maps_Fixed64Fixed64Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Fixed64Fixed64Entry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_Fixed64Fixed64EntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9729,9 +12384,13 @@ func (ec *executionContext) _Maps_Fixed64Fixed64Entry(ctx context.Context, sel a case "__typename": out.Values[i] = graphql.MarshalString("Maps_Fixed64Fixed64Entry") case "key": + out.Values[i] = ec._Maps_Fixed64Fixed64Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Fixed64Fixed64Entry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9747,7 +12406,6 @@ var maps_Int32Int32EntryImplementors = []string{"Maps_Int32Int32Entry"} func (ec *executionContext) _Maps_Int32Int32Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Int32Int32Entry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_Int32Int32EntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9755,9 +12413,13 @@ func (ec *executionContext) _Maps_Int32Int32Entry(ctx context.Context, sel ast.S case "__typename": out.Values[i] = graphql.MarshalString("Maps_Int32Int32Entry") case "key": + out.Values[i] = ec._Maps_Int32Int32Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Int32Int32Entry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9773,7 +12435,6 @@ var maps_Int64Int64EntryImplementors = []string{"Maps_Int64Int64Entry"} func (ec *executionContext) _Maps_Int64Int64Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Int64Int64Entry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_Int64Int64EntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9781,9 +12442,13 @@ func (ec *executionContext) _Maps_Int64Int64Entry(ctx context.Context, sel ast.S case "__typename": out.Values[i] = graphql.MarshalString("Maps_Int64Int64Entry") case "key": + out.Values[i] = ec._Maps_Int64Int64Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Int64Int64Entry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9799,7 +12464,6 @@ var maps_Sfixed32Sfixed32EntryImplementors = []string{"Maps_Sfixed32Sfixed32Entr func (ec *executionContext) _Maps_Sfixed32Sfixed32Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Sfixed32Sfixed32Entry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_Sfixed32Sfixed32EntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9807,9 +12471,13 @@ func (ec *executionContext) _Maps_Sfixed32Sfixed32Entry(ctx context.Context, sel case "__typename": out.Values[i] = graphql.MarshalString("Maps_Sfixed32Sfixed32Entry") case "key": + out.Values[i] = ec._Maps_Sfixed32Sfixed32Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Sfixed32Sfixed32Entry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9825,7 +12493,6 @@ var maps_Sfixed64Sfixed64EntryImplementors = []string{"Maps_Sfixed64Sfixed64Entr func (ec *executionContext) _Maps_Sfixed64Sfixed64Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Sfixed64Sfixed64Entry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_Sfixed64Sfixed64EntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9833,9 +12500,13 @@ func (ec *executionContext) _Maps_Sfixed64Sfixed64Entry(ctx context.Context, sel case "__typename": out.Values[i] = graphql.MarshalString("Maps_Sfixed64Sfixed64Entry") case "key": + out.Values[i] = ec._Maps_Sfixed64Sfixed64Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Sfixed64Sfixed64Entry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9851,7 +12522,6 @@ var maps_Sint32Sint32EntryImplementors = []string{"Maps_Sint32Sint32Entry"} func (ec *executionContext) _Maps_Sint32Sint32Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Sint32Sint32Entry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_Sint32Sint32EntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9859,9 +12529,13 @@ func (ec *executionContext) _Maps_Sint32Sint32Entry(ctx context.Context, sel ast case "__typename": out.Values[i] = graphql.MarshalString("Maps_Sint32Sint32Entry") case "key": + out.Values[i] = ec._Maps_Sint32Sint32Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Sint32Sint32Entry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9877,7 +12551,6 @@ var maps_Sint64Sint64EntryImplementors = []string{"Maps_Sint64Sint64Entry"} func (ec *executionContext) _Maps_Sint64Sint64Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Sint64Sint64Entry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_Sint64Sint64EntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9885,9 +12558,13 @@ func (ec *executionContext) _Maps_Sint64Sint64Entry(ctx context.Context, sel ast case "__typename": out.Values[i] = graphql.MarshalString("Maps_Sint64Sint64Entry") case "key": + out.Values[i] = ec._Maps_Sint64Sint64Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Sint64Sint64Entry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9903,7 +12580,6 @@ var maps_StringBarEntryImplementors = []string{"Maps_StringBarEntry"} func (ec *executionContext) _Maps_StringBarEntry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_StringBarEntry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_StringBarEntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9911,9 +12587,13 @@ func (ec *executionContext) _Maps_StringBarEntry(ctx context.Context, sel ast.Se case "__typename": out.Values[i] = graphql.MarshalString("Maps_StringBarEntry") case "key": + out.Values[i] = ec._Maps_StringBarEntry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_StringBarEntry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9929,7 +12609,6 @@ var maps_StringBytesEntryImplementors = []string{"Maps_StringBytesEntry"} func (ec *executionContext) _Maps_StringBytesEntry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_StringBytesEntry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_StringBytesEntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9937,9 +12616,13 @@ func (ec *executionContext) _Maps_StringBytesEntry(ctx context.Context, sel ast. case "__typename": out.Values[i] = graphql.MarshalString("Maps_StringBytesEntry") case "key": + out.Values[i] = ec._Maps_StringBytesEntry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_StringBytesEntry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9955,7 +12638,6 @@ var maps_StringDoubleEntryImplementors = []string{"Maps_StringDoubleEntry"} func (ec *executionContext) _Maps_StringDoubleEntry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_StringDoubleEntry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_StringDoubleEntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9963,9 +12645,13 @@ func (ec *executionContext) _Maps_StringDoubleEntry(ctx context.Context, sel ast case "__typename": out.Values[i] = graphql.MarshalString("Maps_StringDoubleEntry") case "key": + out.Values[i] = ec._Maps_StringDoubleEntry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_StringDoubleEntry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9981,7 +12667,6 @@ var maps_StringFloatEntryImplementors = []string{"Maps_StringFloatEntry"} func (ec *executionContext) _Maps_StringFloatEntry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_StringFloatEntry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_StringFloatEntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -9989,9 +12674,13 @@ func (ec *executionContext) _Maps_StringFloatEntry(ctx context.Context, sel ast. case "__typename": out.Values[i] = graphql.MarshalString("Maps_StringFloatEntry") case "key": + out.Values[i] = ec._Maps_StringFloatEntry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_StringFloatEntry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10007,7 +12696,6 @@ var maps_StringFooEntryImplementors = []string{"Maps_StringFooEntry"} func (ec *executionContext) _Maps_StringFooEntry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_StringFooEntry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_StringFooEntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10015,9 +12703,13 @@ func (ec *executionContext) _Maps_StringFooEntry(ctx context.Context, sel ast.Se case "__typename": out.Values[i] = graphql.MarshalString("Maps_StringFooEntry") case "key": + out.Values[i] = ec._Maps_StringFooEntry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_StringFooEntry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10033,7 +12725,6 @@ var maps_StringStringEntryImplementors = []string{"Maps_StringStringEntry"} func (ec *executionContext) _Maps_StringStringEntry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_StringStringEntry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_StringStringEntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10041,9 +12732,13 @@ func (ec *executionContext) _Maps_StringStringEntry(ctx context.Context, sel ast case "__typename": out.Values[i] = graphql.MarshalString("Maps_StringStringEntry") case "key": + out.Values[i] = ec._Maps_StringStringEntry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_StringStringEntry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10059,7 +12754,6 @@ var maps_Uint32Uint32EntryImplementors = []string{"Maps_Uint32Uint32Entry"} func (ec *executionContext) _Maps_Uint32Uint32Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Uint32Uint32Entry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_Uint32Uint32EntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10067,9 +12761,13 @@ func (ec *executionContext) _Maps_Uint32Uint32Entry(ctx context.Context, sel ast case "__typename": out.Values[i] = graphql.MarshalString("Maps_Uint32Uint32Entry") case "key": + out.Values[i] = ec._Maps_Uint32Uint32Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Uint32Uint32Entry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10085,7 +12783,6 @@ var maps_Uint64Uint64EntryImplementors = []string{"Maps_Uint64Uint64Entry"} func (ec *executionContext) _Maps_Uint64Uint64Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Uint64Uint64Entry) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, maps_Uint64Uint64EntryImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10093,9 +12790,13 @@ func (ec *executionContext) _Maps_Uint64Uint64Entry(ctx context.Context, sel ast case "__typename": out.Values[i] = graphql.MarshalString("Maps_Uint64Uint64Entry") case "key": + out.Values[i] = ec._Maps_Uint64Uint64Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Uint64Uint64Entry_value(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10111,7 +12812,6 @@ var mutationImplementors = []string{"Mutation"} func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) - ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Mutation", }) @@ -10119,29 +12819,74 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { + innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ + Object: field.Name, + Field: field, + }) + switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("Mutation") case "constructsScalars_": - out.Values[i] = ec._Mutation_constructsScalars_(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_constructsScalars_(ctx, field) + }) + case "constructsRepeated_": - out.Values[i] = ec._Mutation_constructsRepeated_(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_constructsRepeated_(ctx, field) + }) + case "constructsMaps_": - out.Values[i] = ec._Mutation_constructsMaps_(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_constructsMaps_(ctx, field) + }) + case "constructsAny_": - out.Values[i] = ec._Mutation_constructsAny_(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_constructsAny_(ctx, field) + }) + case "constructsEmpty_": - out.Values[i] = ec._Mutation_constructsEmpty_(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_constructsEmpty_(ctx, field) + }) + case "constructsEmpty2_": - out.Values[i] = ec._Mutation_constructsEmpty2_(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_constructsEmpty2_(ctx, field) + }) + case "constructsEmpty3_": - out.Values[i] = ec._Mutation_constructsEmpty3_(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_constructsEmpty3_(ctx, field) + }) + case "constructsRef_": - out.Values[i] = ec._Mutation_constructsRef_(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_constructsRef_(ctx, field) + }) + case "constructsOneof_": - out.Values[i] = ec._Mutation_constructsOneof_(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_constructsOneof_(ctx, field) + }) + case "constructsCallWithId": - out.Values[i] = ec._Mutation_constructsCallWithId(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_constructsCallWithId(ctx, field) + }) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10157,7 +12902,6 @@ var oneofImplementors = []string{"Oneof"} func (ec *executionContext) _Oneof(ctx context.Context, sel ast.SelectionSet, obj *pb.Oneof) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, oneofImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10165,10 +12909,13 @@ func (ec *executionContext) _Oneof(ctx context.Context, sel ast.SelectionSet, ob case "__typename": out.Values[i] = graphql.MarshalString("Oneof") case "param1": + out.Values[i] = ec._Oneof_param1(ctx, field, obj) + case "oneof1": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -10176,10 +12923,16 @@ func (ec *executionContext) _Oneof(ctx context.Context, sel ast.SelectionSet, ob }() res = ec._Oneof_oneof1(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "oneof2": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -10187,10 +12940,16 @@ func (ec *executionContext) _Oneof(ctx context.Context, sel ast.SelectionSet, ob }() res = ec._Oneof_oneof2(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) case "oneof3": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -10198,6 +12957,11 @@ func (ec *executionContext) _Oneof(ctx context.Context, sel ast.SelectionSet, ob }() res = ec._Oneof_oneof3(ctx, field, obj) return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + }) default: panic("unknown field " + strconv.Quote(field.Name)) @@ -10214,7 +12978,6 @@ var oneof_Param2Implementors = []string{"Oneof_Param2", "Oneof_Oneof1"} func (ec *executionContext) _Oneof_Param2(ctx context.Context, sel ast.SelectionSet, obj *pb.Oneof_Param2) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, oneof_Param2Implementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10222,7 +12985,9 @@ func (ec *executionContext) _Oneof_Param2(ctx context.Context, sel ast.Selection case "__typename": out.Values[i] = graphql.MarshalString("Oneof_Param2") case "param2": + out.Values[i] = ec._Oneof_Param2_param2(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10238,7 +13003,6 @@ var oneof_Param3Implementors = []string{"Oneof_Param3", "Oneof_Oneof1"} func (ec *executionContext) _Oneof_Param3(ctx context.Context, sel ast.SelectionSet, obj *pb.Oneof_Param3) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, oneof_Param3Implementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10246,7 +13010,9 @@ func (ec *executionContext) _Oneof_Param3(ctx context.Context, sel ast.Selection case "__typename": out.Values[i] = graphql.MarshalString("Oneof_Param3") case "param3": + out.Values[i] = ec._Oneof_Param3_param3(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10262,7 +13028,6 @@ var oneof_Param4Implementors = []string{"Oneof_Param4", "Oneof_Oneof2"} func (ec *executionContext) _Oneof_Param4(ctx context.Context, sel ast.SelectionSet, obj *pb.Oneof_Param4) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, oneof_Param4Implementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10270,7 +13035,9 @@ func (ec *executionContext) _Oneof_Param4(ctx context.Context, sel ast.Selection case "__typename": out.Values[i] = graphql.MarshalString("Oneof_Param4") case "param4": + out.Values[i] = ec._Oneof_Param4_param4(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10286,7 +13053,6 @@ var oneof_Param5Implementors = []string{"Oneof_Param5", "Oneof_Oneof2"} func (ec *executionContext) _Oneof_Param5(ctx context.Context, sel ast.SelectionSet, obj *pb.Oneof_Param5) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, oneof_Param5Implementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10294,7 +13060,9 @@ func (ec *executionContext) _Oneof_Param5(ctx context.Context, sel ast.Selection case "__typename": out.Values[i] = graphql.MarshalString("Oneof_Param5") case "param5": + out.Values[i] = ec._Oneof_Param5_param5(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10310,7 +13078,6 @@ var oneof_Param6Implementors = []string{"Oneof_Param6", "Oneof_Oneof3"} func (ec *executionContext) _Oneof_Param6(ctx context.Context, sel ast.SelectionSet, obj *pb.Oneof_Param6) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, oneof_Param6Implementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10318,7 +13085,9 @@ func (ec *executionContext) _Oneof_Param6(ctx context.Context, sel ast.Selection case "__typename": out.Values[i] = graphql.MarshalString("Oneof_Param6") case "param6": + out.Values[i] = ec._Oneof_Param6_param6(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10334,7 +13103,6 @@ var pb_AnyImplementors = []string{"Pb_Any"} func (ec *executionContext) _Pb_Any(ctx context.Context, sel ast.SelectionSet, obj *pb.Any) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, pb_AnyImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10342,7 +13110,9 @@ func (ec *executionContext) _Pb_Any(ctx context.Context, sel ast.SelectionSet, o case "__typename": out.Values[i] = graphql.MarshalString("Pb_Any") case "param1": + out.Values[i] = ec._Pb_Any_param1(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10358,7 +13128,6 @@ var queryImplementors = []string{"Query"} func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) - ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ Object: "Query", }) @@ -10366,12 +13135,18 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { + innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ + Object: field.Name, + Field: field, + }) + switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("Query") case "dummy": field := field - out.Concurrently(i, func() (res graphql.Marshaler) { + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -10379,11 +13154,27 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr }() res = ec._Query_dummy(ctx, field) return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) }) case "__type": - out.Values[i] = ec._Query___type(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Query___type(ctx, field) + }) + case "__schema": - out.Values[i] = ec._Query___schema(ctx, field) + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Query___schema(ctx, field) + }) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10399,7 +13190,6 @@ var refImplementors = []string{"Ref"} func (ec *executionContext) _Ref(ctx context.Context, sel ast.SelectionSet, obj *pb.Ref) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, refImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10407,27 +13197,49 @@ func (ec *executionContext) _Ref(ctx context.Context, sel ast.SelectionSet, obj case "__typename": out.Values[i] = graphql.MarshalString("Ref") case "localTime2": + out.Values[i] = ec._Ref_localTime2(ctx, field, obj) + case "external": + out.Values[i] = ec._Ref_external(ctx, field, obj) + case "localTime": + out.Values[i] = ec._Ref_localTime(ctx, field, obj) + case "file": + out.Values[i] = ec._Ref_file(ctx, field, obj) + case "fileMsg": + out.Values[i] = ec._Ref_fileMsg(ctx, field, obj) + case "fileEnum": + out.Values[i] = ec._Ref_fileEnum(ctx, field, obj) + case "local": + out.Values[i] = ec._Ref_local(ctx, field, obj) + case "foreign": + out.Values[i] = ec._Ref_foreign(ctx, field, obj) + case "en1": + out.Values[i] = ec._Ref_en1(ctx, field, obj) + case "en2": + out.Values[i] = ec._Ref_en2(ctx, field, obj) + case "gz": + out.Values[i] = ec._Ref_gz(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10443,7 +13255,6 @@ var ref_BarImplementors = []string{"Ref_Bar"} func (ec *executionContext) _Ref_Bar(ctx context.Context, sel ast.SelectionSet, obj *pb.Ref_Bar) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, ref_BarImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10451,7 +13262,9 @@ func (ec *executionContext) _Ref_Bar(ctx context.Context, sel ast.SelectionSet, case "__typename": out.Values[i] = graphql.MarshalString("Ref_Bar") case "param1": + out.Values[i] = ec._Ref_Bar_param1(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10467,7 +13280,6 @@ var ref_FooImplementors = []string{"Ref_Foo"} func (ec *executionContext) _Ref_Foo(ctx context.Context, sel ast.SelectionSet, obj *pb.Ref_Foo) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, ref_FooImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10475,17 +13287,29 @@ func (ec *executionContext) _Ref_Foo(ctx context.Context, sel ast.SelectionSet, case "__typename": out.Values[i] = graphql.MarshalString("Ref_Foo") case "bar1": + out.Values[i] = ec._Ref_Foo_bar1(ctx, field, obj) + case "localTime2": + out.Values[i] = ec._Ref_Foo_localTime2(ctx, field, obj) + case "externalTime1": + out.Values[i] = ec._Ref_Foo_externalTime1(ctx, field, obj) + case "bar2": + out.Values[i] = ec._Ref_Foo_bar2(ctx, field, obj) + case "en1": + out.Values[i] = ec._Ref_Foo_en1(ctx, field, obj) + case "en2": + out.Values[i] = ec._Ref_Foo_en2(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10501,7 +13325,6 @@ var ref_Foo_BarImplementors = []string{"Ref_Foo_Bar"} func (ec *executionContext) _Ref_Foo_Bar(ctx context.Context, sel ast.SelectionSet, obj *pb.Ref_Foo_Bar) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, ref_Foo_BarImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10509,7 +13332,9 @@ func (ec *executionContext) _Ref_Foo_Bar(ctx context.Context, sel ast.SelectionS case "__typename": out.Values[i] = graphql.MarshalString("Ref_Foo_Bar") case "param1": + out.Values[i] = ec._Ref_Foo_Bar_param1(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10525,7 +13350,6 @@ var ref_Foo_Baz_GzImplementors = []string{"Ref_Foo_Baz_Gz"} func (ec *executionContext) _Ref_Foo_Baz_Gz(ctx context.Context, sel ast.SelectionSet, obj *pb.Ref_Foo_Baz_Gz) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, ref_Foo_Baz_GzImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10533,7 +13357,9 @@ func (ec *executionContext) _Ref_Foo_Baz_Gz(ctx context.Context, sel ast.Selecti case "__typename": out.Values[i] = graphql.MarshalString("Ref_Foo_Baz_Gz") case "param1": + out.Values[i] = ec._Ref_Foo_Baz_Gz_param1(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10549,7 +13375,6 @@ var repeatedImplementors = []string{"Repeated"} func (ec *executionContext) _Repeated(ctx context.Context, sel ast.SelectionSet, obj *pb.Repeated) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, repeatedImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10557,39 +13382,73 @@ func (ec *executionContext) _Repeated(ctx context.Context, sel ast.SelectionSet, case "__typename": out.Values[i] = graphql.MarshalString("Repeated") case "double": + out.Values[i] = ec._Repeated_double(ctx, field, obj) + case "float": + out.Values[i] = ec._Repeated_float(ctx, field, obj) + case "int32": + out.Values[i] = ec._Repeated_int32(ctx, field, obj) + case "int64": + out.Values[i] = ec._Repeated_int64(ctx, field, obj) + case "uint32": + out.Values[i] = ec._Repeated_uint32(ctx, field, obj) + case "uint64": + out.Values[i] = ec._Repeated_uint64(ctx, field, obj) + case "sint32": + out.Values[i] = ec._Repeated_sint32(ctx, field, obj) + case "sint64": + out.Values[i] = ec._Repeated_sint64(ctx, field, obj) + case "fixed32": + out.Values[i] = ec._Repeated_fixed32(ctx, field, obj) + case "fixed64": + out.Values[i] = ec._Repeated_fixed64(ctx, field, obj) + case "sfixed32": + out.Values[i] = ec._Repeated_sfixed32(ctx, field, obj) + case "sfixed64": + out.Values[i] = ec._Repeated_sfixed64(ctx, field, obj) + case "bool": + out.Values[i] = ec._Repeated_bool(ctx, field, obj) + case "stringX": + out.Values[i] = ec._Repeated_stringX(ctx, field, obj) + case "bytes": + out.Values[i] = ec._Repeated_bytes(ctx, field, obj) + case "foo": + out.Values[i] = ec._Repeated_foo(ctx, field, obj) + case "bar": + out.Values[i] = ec._Repeated_bar(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10605,7 +13464,6 @@ var scalarsImplementors = []string{"Scalars"} func (ec *executionContext) _Scalars(ctx context.Context, sel ast.SelectionSet, obj *pb.Scalars) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, scalarsImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10613,37 +13471,69 @@ func (ec *executionContext) _Scalars(ctx context.Context, sel ast.SelectionSet, case "__typename": out.Values[i] = graphql.MarshalString("Scalars") case "double": + out.Values[i] = ec._Scalars_double(ctx, field, obj) + case "float": + out.Values[i] = ec._Scalars_float(ctx, field, obj) + case "int32": + out.Values[i] = ec._Scalars_int32(ctx, field, obj) + case "int64": + out.Values[i] = ec._Scalars_int64(ctx, field, obj) + case "uint32": + out.Values[i] = ec._Scalars_uint32(ctx, field, obj) + case "uint64": + out.Values[i] = ec._Scalars_uint64(ctx, field, obj) + case "sint32": + out.Values[i] = ec._Scalars_sint32(ctx, field, obj) + case "sint64": + out.Values[i] = ec._Scalars_sint64(ctx, field, obj) + case "fixed32": + out.Values[i] = ec._Scalars_fixed32(ctx, field, obj) + case "fixed64": + out.Values[i] = ec._Scalars_fixed64(ctx, field, obj) + case "sfixed32": + out.Values[i] = ec._Scalars_sfixed32(ctx, field, obj) + case "sfixed64": + out.Values[i] = ec._Scalars_sfixed64(ctx, field, obj) + case "bool": + out.Values[i] = ec._Scalars_bool(ctx, field, obj) + case "stringX": + out.Values[i] = ec._Scalars_stringX(ctx, field, obj) + case "bytes": + out.Values[i] = ec._Scalars_bytes(ctx, field, obj) + case "stringOptional": + out.Values[i] = ec._Scalars_stringOptional(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10659,7 +13549,6 @@ var timestampImplementors = []string{"Timestamp"} func (ec *executionContext) _Timestamp(ctx context.Context, sel ast.SelectionSet, obj *pb.Timestamp) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, timestampImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10667,7 +13556,9 @@ func (ec *executionContext) _Timestamp(ctx context.Context, sel ast.SelectionSet case "__typename": out.Values[i] = graphql.MarshalString("Timestamp") case "time": + out.Values[i] = ec._Timestamp_time(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10683,7 +13574,6 @@ var __DirectiveImplementors = []string{"__Directive"} func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10691,19 +13581,34 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS case "__typename": out.Values[i] = graphql.MarshalString("__Directive") case "name": + out.Values[i] = ec.___Directive_name(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "description": + out.Values[i] = ec.___Directive_description(ctx, field, obj) + case "locations": + out.Values[i] = ec.___Directive_locations(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "args": + out.Values[i] = ec.___Directive_args(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "isRepeatable": + + out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } @@ -10722,7 +13627,6 @@ var __EnumValueImplementors = []string{"__EnumValue"} func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10730,19 +13634,27 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS case "__typename": out.Values[i] = graphql.MarshalString("__EnumValue") case "name": + out.Values[i] = ec.___EnumValue_name(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "description": + out.Values[i] = ec.___EnumValue_description(ctx, field, obj) + case "isDeprecated": + out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "deprecationReason": + out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10758,7 +13670,6 @@ var __FieldImplementors = []string{"__Field"} func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10766,29 +13677,41 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, case "__typename": out.Values[i] = graphql.MarshalString("__Field") case "name": + out.Values[i] = ec.___Field_name(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "description": + out.Values[i] = ec.___Field_description(ctx, field, obj) + case "args": + out.Values[i] = ec.___Field_args(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "type": + out.Values[i] = ec.___Field_type(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "isDeprecated": + out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "deprecationReason": + out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10804,7 +13727,6 @@ var __InputValueImplementors = []string{"__InputValue"} func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10812,19 +13734,27 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection case "__typename": out.Values[i] = graphql.MarshalString("__InputValue") case "name": + out.Values[i] = ec.___InputValue_name(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "description": + out.Values[i] = ec.___InputValue_description(ctx, field, obj) + case "type": + out.Values[i] = ec.___InputValue_type(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "defaultValue": + out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10840,29 +13770,42 @@ var __SchemaImplementors = []string{"__Schema"} func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__Schema") + case "description": + + out.Values[i] = ec.___Schema_description(ctx, field, obj) + case "types": + out.Values[i] = ec.___Schema_types(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "queryType": + out.Values[i] = ec.___Schema_queryType(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "mutationType": + out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) + case "subscriptionType": + out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) + case "directives": + out.Values[i] = ec.___Schema_directives(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } @@ -10881,7 +13824,6 @@ var __TypeImplementors = []string{"__Type"} func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -10889,26 +13831,48 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o case "__typename": out.Values[i] = graphql.MarshalString("__Type") case "kind": + out.Values[i] = ec.___Type_kind(ctx, field, obj) + if out.Values[i] == graphql.Null { invalids++ } case "name": + out.Values[i] = ec.___Type_name(ctx, field, obj) + case "description": + out.Values[i] = ec.___Type_description(ctx, field, obj) + case "fields": + out.Values[i] = ec.___Type_fields(ctx, field, obj) + case "interfaces": + out.Values[i] = ec.___Type_interfaces(ctx, field, obj) + case "possibleTypes": + out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) + case "enumValues": + out.Values[i] = ec.___Type_enumValues(ctx, field, obj) + case "inputFields": + out.Values[i] = ec.___Type_inputFields(ctx, field, obj) + case "ofType": + out.Values[i] = ec.___Type_ofType(ctx, field, obj) + + case "specifiedByURL": + + out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj) + default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10924,16 +13888,16 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o // region ***************************** type.gotpl ***************************** -func (ec *executionContext) unmarshalNBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx context.Context, v interface{}) (pb.Bar, error) { +func (ec *executionContext) unmarshalNBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBar(ctx context.Context, v interface{}) (pb.Bar, error) { res, err := pb.UnmarshalBar(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx context.Context, sel ast.SelectionSet, v pb.Bar) graphql.Marshaler { +func (ec *executionContext) marshalNBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBar(ctx context.Context, sel ast.SelectionSet, v pb.Bar) graphql.Marshaler { res := pb.MarshalBar(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -10948,7 +13912,7 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se res := graphql.MarshalBoolean(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -10962,14 +13926,14 @@ func (ec *executionContext) unmarshalNBytes2ᚕbyte(ctx context.Context, v inter func (ec *executionContext) marshalNBytes2ᚕbyte(ctx context.Context, sel ast.SelectionSet, v []byte) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } res := types.MarshalBytes(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -10984,7 +13948,7 @@ func (ec *executionContext) marshalNFloat2float32(ctx context.Context, sel ast.S res := types.MarshalFloat32(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -10999,23 +13963,23 @@ func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.S res := graphql.MarshalFloat(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res } -func (ec *executionContext) marshalNFoo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx context.Context, sel ast.SelectionSet, v *pb.Foo) graphql.Marshaler { +func (ec *executionContext) marshalNFoo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo(ctx context.Context, sel ast.SelectionSet, v *pb.Foo) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Foo(ctx, sel, v) } -func (ec *executionContext) unmarshalNFooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx context.Context, v interface{}) (*pb.Foo, error) { +func (ec *executionContext) unmarshalNFooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo(ctx context.Context, v interface{}) (*pb.Foo, error) { res, err := ec.unmarshalInputFooInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } @@ -11029,7 +13993,7 @@ func (ec *executionContext) marshalNInt2int32(ctx context.Context, sel ast.Selec res := graphql.MarshalInt32(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -11044,7 +14008,7 @@ func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.Selec res := graphql.MarshalInt64(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -11059,7 +14023,7 @@ func (ec *executionContext) marshalNInt2uint32(ctx context.Context, sel ast.Sele res := types.MarshalUint32(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -11074,263 +14038,263 @@ func (ec *executionContext) marshalNInt2uint64(ctx context.Context, sel ast.Sele res := types.MarshalUint64(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res } -func (ec *executionContext) marshalNMaps_BoolBoolEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_BoolBoolEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_BoolBoolEntry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_BoolBoolEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_BoolBoolEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_BoolBoolEntry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_BoolBoolEntry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_BoolBoolEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_BoolBoolEntry(ctx context.Context, v interface{}) (*pb.Maps_BoolBoolEntry, error) { +func (ec *executionContext) unmarshalNMaps_BoolBoolEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_BoolBoolEntry(ctx context.Context, v interface{}) (*pb.Maps_BoolBoolEntry, error) { res, err := ec.unmarshalInputMaps_BoolBoolEntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMaps_Fixed32Fixed32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed32Fixed32Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Fixed32Fixed32Entry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_Fixed32Fixed32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Fixed32Fixed32Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Fixed32Fixed32Entry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_Fixed32Fixed32Entry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_Fixed32Fixed32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed32Fixed32Entry(ctx context.Context, v interface{}) (*pb.Maps_Fixed32Fixed32Entry, error) { +func (ec *executionContext) unmarshalNMaps_Fixed32Fixed32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Fixed32Fixed32Entry(ctx context.Context, v interface{}) (*pb.Maps_Fixed32Fixed32Entry, error) { res, err := ec.unmarshalInputMaps_Fixed32Fixed32EntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMaps_Fixed64Fixed64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed64Fixed64Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Fixed64Fixed64Entry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_Fixed64Fixed64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Fixed64Fixed64Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Fixed64Fixed64Entry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_Fixed64Fixed64Entry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_Fixed64Fixed64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed64Fixed64Entry(ctx context.Context, v interface{}) (*pb.Maps_Fixed64Fixed64Entry, error) { +func (ec *executionContext) unmarshalNMaps_Fixed64Fixed64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Fixed64Fixed64Entry(ctx context.Context, v interface{}) (*pb.Maps_Fixed64Fixed64Entry, error) { res, err := ec.unmarshalInputMaps_Fixed64Fixed64EntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMaps_Int32Int32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int32Int32Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Int32Int32Entry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_Int32Int32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Int32Int32Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Int32Int32Entry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_Int32Int32Entry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_Int32Int32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int32Int32Entry(ctx context.Context, v interface{}) (*pb.Maps_Int32Int32Entry, error) { +func (ec *executionContext) unmarshalNMaps_Int32Int32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Int32Int32Entry(ctx context.Context, v interface{}) (*pb.Maps_Int32Int32Entry, error) { res, err := ec.unmarshalInputMaps_Int32Int32EntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMaps_Int64Int64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int64Int64Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Int64Int64Entry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_Int64Int64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Int64Int64Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Int64Int64Entry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_Int64Int64Entry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_Int64Int64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int64Int64Entry(ctx context.Context, v interface{}) (*pb.Maps_Int64Int64Entry, error) { +func (ec *executionContext) unmarshalNMaps_Int64Int64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Int64Int64Entry(ctx context.Context, v interface{}) (*pb.Maps_Int64Int64Entry, error) { res, err := ec.unmarshalInputMaps_Int64Int64EntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMaps_Sfixed32Sfixed32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed32Sfixed32Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Sfixed32Sfixed32Entry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_Sfixed32Sfixed32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sfixed32Sfixed32Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Sfixed32Sfixed32Entry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_Sfixed32Sfixed32Entry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_Sfixed32Sfixed32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed32Sfixed32Entry(ctx context.Context, v interface{}) (*pb.Maps_Sfixed32Sfixed32Entry, error) { +func (ec *executionContext) unmarshalNMaps_Sfixed32Sfixed32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sfixed32Sfixed32Entry(ctx context.Context, v interface{}) (*pb.Maps_Sfixed32Sfixed32Entry, error) { res, err := ec.unmarshalInputMaps_Sfixed32Sfixed32EntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMaps_Sfixed64Sfixed64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed64Sfixed64Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Sfixed64Sfixed64Entry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_Sfixed64Sfixed64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sfixed64Sfixed64Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Sfixed64Sfixed64Entry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_Sfixed64Sfixed64Entry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_Sfixed64Sfixed64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed64Sfixed64Entry(ctx context.Context, v interface{}) (*pb.Maps_Sfixed64Sfixed64Entry, error) { +func (ec *executionContext) unmarshalNMaps_Sfixed64Sfixed64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sfixed64Sfixed64Entry(ctx context.Context, v interface{}) (*pb.Maps_Sfixed64Sfixed64Entry, error) { res, err := ec.unmarshalInputMaps_Sfixed64Sfixed64EntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMaps_Sint32Sint32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint32Sint32Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Sint32Sint32Entry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_Sint32Sint32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sint32Sint32Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Sint32Sint32Entry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_Sint32Sint32Entry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_Sint32Sint32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint32Sint32Entry(ctx context.Context, v interface{}) (*pb.Maps_Sint32Sint32Entry, error) { +func (ec *executionContext) unmarshalNMaps_Sint32Sint32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sint32Sint32Entry(ctx context.Context, v interface{}) (*pb.Maps_Sint32Sint32Entry, error) { res, err := ec.unmarshalInputMaps_Sint32Sint32EntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMaps_Sint64Sint64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint64Sint64Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Sint64Sint64Entry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_Sint64Sint64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sint64Sint64Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Sint64Sint64Entry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_Sint64Sint64Entry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_Sint64Sint64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint64Sint64Entry(ctx context.Context, v interface{}) (*pb.Maps_Sint64Sint64Entry, error) { +func (ec *executionContext) unmarshalNMaps_Sint64Sint64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sint64Sint64Entry(ctx context.Context, v interface{}) (*pb.Maps_Sint64Sint64Entry, error) { res, err := ec.unmarshalInputMaps_Sint64Sint64EntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMaps_StringBarEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBarEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringBarEntry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_StringBarEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringBarEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringBarEntry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_StringBarEntry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_StringBarEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBarEntry(ctx context.Context, v interface{}) (*pb.Maps_StringBarEntry, error) { +func (ec *executionContext) unmarshalNMaps_StringBarEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringBarEntry(ctx context.Context, v interface{}) (*pb.Maps_StringBarEntry, error) { res, err := ec.unmarshalInputMaps_StringBarEntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMaps_StringBytesEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBytesEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringBytesEntry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_StringBytesEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringBytesEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringBytesEntry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_StringBytesEntry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_StringBytesEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBytesEntry(ctx context.Context, v interface{}) (*pb.Maps_StringBytesEntry, error) { +func (ec *executionContext) unmarshalNMaps_StringBytesEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringBytesEntry(ctx context.Context, v interface{}) (*pb.Maps_StringBytesEntry, error) { res, err := ec.unmarshalInputMaps_StringBytesEntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMaps_StringDoubleEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringDoubleEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringDoubleEntry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_StringDoubleEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringDoubleEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringDoubleEntry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_StringDoubleEntry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_StringDoubleEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringDoubleEntry(ctx context.Context, v interface{}) (*pb.Maps_StringDoubleEntry, error) { +func (ec *executionContext) unmarshalNMaps_StringDoubleEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringDoubleEntry(ctx context.Context, v interface{}) (*pb.Maps_StringDoubleEntry, error) { res, err := ec.unmarshalInputMaps_StringDoubleEntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMaps_StringFloatEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFloatEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringFloatEntry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_StringFloatEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringFloatEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringFloatEntry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_StringFloatEntry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_StringFloatEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFloatEntry(ctx context.Context, v interface{}) (*pb.Maps_StringFloatEntry, error) { +func (ec *executionContext) unmarshalNMaps_StringFloatEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringFloatEntry(ctx context.Context, v interface{}) (*pb.Maps_StringFloatEntry, error) { res, err := ec.unmarshalInputMaps_StringFloatEntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMaps_StringFooEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFooEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringFooEntry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_StringFooEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringFooEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringFooEntry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_StringFooEntry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_StringFooEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFooEntry(ctx context.Context, v interface{}) (*pb.Maps_StringFooEntry, error) { +func (ec *executionContext) unmarshalNMaps_StringFooEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringFooEntry(ctx context.Context, v interface{}) (*pb.Maps_StringFooEntry, error) { res, err := ec.unmarshalInputMaps_StringFooEntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMaps_StringStringEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringStringEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringStringEntry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_StringStringEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringStringEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringStringEntry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_StringStringEntry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_StringStringEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringStringEntry(ctx context.Context, v interface{}) (*pb.Maps_StringStringEntry, error) { +func (ec *executionContext) unmarshalNMaps_StringStringEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringStringEntry(ctx context.Context, v interface{}) (*pb.Maps_StringStringEntry, error) { res, err := ec.unmarshalInputMaps_StringStringEntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMaps_Uint32Uint32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint32Uint32Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Uint32Uint32Entry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_Uint32Uint32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Uint32Uint32Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Uint32Uint32Entry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_Uint32Uint32Entry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_Uint32Uint32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint32Uint32Entry(ctx context.Context, v interface{}) (*pb.Maps_Uint32Uint32Entry, error) { +func (ec *executionContext) unmarshalNMaps_Uint32Uint32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Uint32Uint32Entry(ctx context.Context, v interface{}) (*pb.Maps_Uint32Uint32Entry, error) { res, err := ec.unmarshalInputMaps_Uint32Uint32EntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNMaps_Uint64Uint64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint64Uint64Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Uint64Uint64Entry) graphql.Marshaler { +func (ec *executionContext) marshalNMaps_Uint64Uint64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Uint64Uint64Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Uint64Uint64Entry) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } return ec._Maps_Uint64Uint64Entry(ctx, sel, v) } -func (ec *executionContext) unmarshalNMaps_Uint64Uint64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint64Uint64Entry(ctx context.Context, v interface{}) (*pb.Maps_Uint64Uint64Entry, error) { +func (ec *executionContext) unmarshalNMaps_Uint64Uint64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Uint64Uint64Entry(ctx context.Context, v interface{}) (*pb.Maps_Uint64Uint64Entry, error) { res, err := ec.unmarshalInputMaps_Uint64Uint64EntryInput(ctx, v) return &res, graphql.ErrorOnPath(ctx, err) } @@ -11344,7 +14308,7 @@ func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.S res := graphql.MarshalString(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -11387,7 +14351,14 @@ func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgq } } - wg.Wait() + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -11400,7 +14371,7 @@ func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Conte res := graphql.MarshalString(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -11409,11 +14380,7 @@ func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Conte func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]string, len(vSlice)) @@ -11461,6 +14428,13 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -11510,6 +14484,13 @@ func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -11551,13 +14532,20 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } return graphql.Null } @@ -11573,7 +14561,7 @@ func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel a res := graphql.MarshalString(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") + ec.Errorf(ctx, "the requested element is null which the schema does not allow") } } return res @@ -11591,35 +14579,33 @@ func (ec *executionContext) marshalOAny2ᚖgoogleᚗgolangᚗorgᚋprotobufᚋty if v == nil { return graphql.Null } - return types.MarshalAny(v) + res := types.MarshalAny(v) + return res } -func (ec *executionContext) unmarshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx context.Context, v interface{}) (pb.Bar, error) { +func (ec *executionContext) unmarshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBar(ctx context.Context, v interface{}) (pb.Bar, error) { res, err := pb.UnmarshalBar(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx context.Context, sel ast.SelectionSet, v pb.Bar) graphql.Marshaler { - return pb.MarshalBar(v) +func (ec *executionContext) marshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBar(ctx context.Context, sel ast.SelectionSet, v pb.Bar) graphql.Marshaler { + res := pb.MarshalBar(v) + return res } -func (ec *executionContext) unmarshalOBar2ᚕgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBarᚄ(ctx context.Context, v interface{}) ([]pb.Bar, error) { +func (ec *executionContext) unmarshalOBar2ᚕgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBarᚄ(ctx context.Context, v interface{}) ([]pb.Bar, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]pb.Bar, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx, vSlice[i]) + res[i], err = ec.unmarshalNBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBar(ctx, vSlice[i]) if err != nil { return nil, err } @@ -11627,7 +14613,7 @@ func (ec *executionContext) unmarshalOBar2ᚕgithubᚗcomᚋdanielvladcoᚋgoᚑ return res, nil } -func (ec *executionContext) marshalOBar2ᚕgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBarᚄ(ctx context.Context, sel ast.SelectionSet, v []pb.Bar) graphql.Marshaler { +func (ec *executionContext) marshalOBar2ᚕgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBarᚄ(ctx context.Context, sel ast.SelectionSet, v []pb.Bar) graphql.Marshaler { if v == nil { return graphql.Null } @@ -11654,7 +14640,7 @@ func (ec *executionContext) marshalOBar2ᚕgithubᚗcomᚋdanielvladcoᚋgoᚑpr if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx, sel, v[i]) + ret[i] = ec.marshalNBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBar(ctx, sel, v[i]) } if isLen1 { f(i) @@ -11664,17 +14650,24 @@ func (ec *executionContext) marshalOBar2ᚕgithubᚗcomᚋdanielvladcoᚋgoᚑpr } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) marshalOBaz2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBaz(ctx context.Context, sel ast.SelectionSet, v *pb.Baz) graphql.Marshaler { +func (ec *executionContext) marshalOBaz2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBaz(ctx context.Context, sel ast.SelectionSet, v *pb.Baz) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Baz(ctx, sel, v) } -func (ec *executionContext) unmarshalOBazInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBaz(ctx context.Context, v interface{}) (*pb.Baz, error) { +func (ec *executionContext) unmarshalOBazInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐBaz(ctx context.Context, v interface{}) (*pb.Baz, error) { if v == nil { return nil, nil } @@ -11688,7 +14681,8 @@ func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interf } func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { - return graphql.MarshalBoolean(v) + res := graphql.MarshalBoolean(v) + return res } func (ec *executionContext) unmarshalOBoolean2ᚕboolᚄ(ctx context.Context, v interface{}) ([]bool, error) { @@ -11697,11 +14691,7 @@ func (ec *executionContext) unmarshalOBoolean2ᚕboolᚄ(ctx context.Context, v } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]bool, len(vSlice)) @@ -11724,6 +14714,12 @@ func (ec *executionContext) marshalOBoolean2ᚕboolᚄ(ctx context.Context, sel ret[i] = ec.marshalNBoolean2bool(ctx, sel, v[i]) } + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -11739,7 +14735,8 @@ func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast if v == nil { return graphql.Null } - return graphql.MarshalBoolean(*v) + res := graphql.MarshalBoolean(*v) + return res } func (ec *executionContext) unmarshalOBytes2ᚕbyte(ctx context.Context, v interface{}) ([]byte, error) { @@ -11754,7 +14751,8 @@ func (ec *executionContext) marshalOBytes2ᚕbyte(ctx context.Context, sel ast.S if v == nil { return graphql.Null } - return types.MarshalBytes(v) + res := types.MarshalBytes(v) + return res } func (ec *executionContext) unmarshalOBytes2ᚕᚕbyteᚄ(ctx context.Context, v interface{}) ([][]byte, error) { @@ -11763,11 +14761,7 @@ func (ec *executionContext) unmarshalOBytes2ᚕᚕbyteᚄ(ctx context.Context, v } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([][]byte, len(vSlice)) @@ -11790,6 +14784,12 @@ func (ec *executionContext) marshalOBytes2ᚕᚕbyteᚄ(ctx context.Context, sel ret[i] = ec.marshalNBytes2ᚕbyte(ctx, sel, v[i]) } + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -11799,7 +14799,8 @@ func (ec *executionContext) unmarshalOFloat2float32(ctx context.Context, v inter } func (ec *executionContext) marshalOFloat2float32(ctx context.Context, sel ast.SelectionSet, v float32) graphql.Marshaler { - return types.MarshalFloat32(v) + res := types.MarshalFloat32(v) + return res } func (ec *executionContext) unmarshalOFloat2float64(ctx context.Context, v interface{}) (float64, error) { @@ -11808,7 +14809,8 @@ func (ec *executionContext) unmarshalOFloat2float64(ctx context.Context, v inter } func (ec *executionContext) marshalOFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { - return graphql.MarshalFloat(v) + res := graphql.MarshalFloat(v) + return res } func (ec *executionContext) unmarshalOFloat2ᚕfloat32ᚄ(ctx context.Context, v interface{}) ([]float32, error) { @@ -11817,11 +14819,7 @@ func (ec *executionContext) unmarshalOFloat2ᚕfloat32ᚄ(ctx context.Context, v } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]float32, len(vSlice)) @@ -11844,6 +14842,12 @@ func (ec *executionContext) marshalOFloat2ᚕfloat32ᚄ(ctx context.Context, sel ret[i] = ec.marshalNFloat2float32(ctx, sel, v[i]) } + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -11853,11 +14857,7 @@ func (ec *executionContext) unmarshalOFloat2ᚕfloat64ᚄ(ctx context.Context, v } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]float64, len(vSlice)) @@ -11880,10 +14880,16 @@ func (ec *executionContext) marshalOFloat2ᚕfloat64ᚄ(ctx context.Context, sel ret[i] = ec.marshalNFloat2float64(ctx, sel, v[i]) } + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) marshalOFoo2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFooᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Foo) graphql.Marshaler { +func (ec *executionContext) marshalOFoo2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFooᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Foo) graphql.Marshaler { if v == nil { return graphql.Null } @@ -11910,7 +14916,7 @@ func (ec *executionContext) marshalOFoo2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgo if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNFoo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx, sel, v[i]) + ret[i] = ec.marshalNFoo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo(ctx, sel, v[i]) } if isLen1 { f(i) @@ -11920,33 +14926,36 @@ func (ec *executionContext) marshalOFoo2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgo } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) marshalOFoo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx context.Context, sel ast.SelectionSet, v *pb.Foo) graphql.Marshaler { +func (ec *executionContext) marshalOFoo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo(ctx context.Context, sel ast.SelectionSet, v *pb.Foo) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Foo(ctx, sel, v) } -func (ec *executionContext) unmarshalOFooInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFooᚄ(ctx context.Context, v interface{}) ([]*pb.Foo, error) { +func (ec *executionContext) unmarshalOFooInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFooᚄ(ctx context.Context, v interface{}) ([]*pb.Foo, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Foo, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNFooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx, vSlice[i]) + res[i], err = ec.unmarshalNFooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo(ctx, vSlice[i]) if err != nil { return nil, err } @@ -11954,7 +14963,7 @@ func (ec *executionContext) unmarshalOFooInput2ᚕᚖgithubᚗcomᚋdanielvladco return res, nil } -func (ec *executionContext) unmarshalOFooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx context.Context, v interface{}) (*pb.Foo, error) { +func (ec *executionContext) unmarshalOFooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo(ctx context.Context, v interface{}) (*pb.Foo, error) { if v == nil { return nil, nil } @@ -11962,14 +14971,14 @@ func (ec *executionContext) unmarshalOFooInput2ᚖgithubᚗcomᚋdanielvladcoᚋ return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOFoo_Foo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo_Foo2(ctx context.Context, sel ast.SelectionSet, v *pb.Foo_Foo2) graphql.Marshaler { +func (ec *executionContext) marshalOFoo_Foo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo_Foo2(ctx context.Context, sel ast.SelectionSet, v *pb.Foo_Foo2) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Foo_Foo2(ctx, sel, v) } -func (ec *executionContext) unmarshalOFoo_Foo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo_Foo2(ctx context.Context, v interface{}) (*pb.Foo_Foo2, error) { +func (ec *executionContext) unmarshalOFoo_Foo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo_Foo2(ctx context.Context, v interface{}) (*pb.Foo_Foo2, error) { if v == nil { return nil, nil } @@ -11998,7 +15007,8 @@ func (ec *executionContext) unmarshalOInt2int32(ctx context.Context, v interface } func (ec *executionContext) marshalOInt2int32(ctx context.Context, sel ast.SelectionSet, v int32) graphql.Marshaler { - return graphql.MarshalInt32(v) + res := graphql.MarshalInt32(v) + return res } func (ec *executionContext) unmarshalOInt2int64(ctx context.Context, v interface{}) (int64, error) { @@ -12007,7 +15017,8 @@ func (ec *executionContext) unmarshalOInt2int64(ctx context.Context, v interface } func (ec *executionContext) marshalOInt2int64(ctx context.Context, sel ast.SelectionSet, v int64) graphql.Marshaler { - return graphql.MarshalInt64(v) + res := graphql.MarshalInt64(v) + return res } func (ec *executionContext) unmarshalOInt2uint32(ctx context.Context, v interface{}) (uint32, error) { @@ -12016,7 +15027,8 @@ func (ec *executionContext) unmarshalOInt2uint32(ctx context.Context, v interfac } func (ec *executionContext) marshalOInt2uint32(ctx context.Context, sel ast.SelectionSet, v uint32) graphql.Marshaler { - return types.MarshalUint32(v) + res := types.MarshalUint32(v) + return res } func (ec *executionContext) unmarshalOInt2uint64(ctx context.Context, v interface{}) (uint64, error) { @@ -12025,7 +15037,8 @@ func (ec *executionContext) unmarshalOInt2uint64(ctx context.Context, v interfac } func (ec *executionContext) marshalOInt2uint64(ctx context.Context, sel ast.SelectionSet, v uint64) graphql.Marshaler { - return types.MarshalUint64(v) + res := types.MarshalUint64(v) + return res } func (ec *executionContext) unmarshalOInt2ᚕint32ᚄ(ctx context.Context, v interface{}) ([]int32, error) { @@ -12034,11 +15047,7 @@ func (ec *executionContext) unmarshalOInt2ᚕint32ᚄ(ctx context.Context, v int } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]int32, len(vSlice)) @@ -12061,6 +15070,12 @@ func (ec *executionContext) marshalOInt2ᚕint32ᚄ(ctx context.Context, sel ast ret[i] = ec.marshalNInt2int32(ctx, sel, v[i]) } + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -12070,11 +15085,7 @@ func (ec *executionContext) unmarshalOInt2ᚕint64ᚄ(ctx context.Context, v int } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]int64, len(vSlice)) @@ -12097,6 +15108,12 @@ func (ec *executionContext) marshalOInt2ᚕint64ᚄ(ctx context.Context, sel ast ret[i] = ec.marshalNInt2int64(ctx, sel, v[i]) } + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -12106,11 +15123,7 @@ func (ec *executionContext) unmarshalOInt2ᚕuint32ᚄ(ctx context.Context, v in } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]uint32, len(vSlice)) @@ -12133,6 +15146,12 @@ func (ec *executionContext) marshalOInt2ᚕuint32ᚄ(ctx context.Context, sel as ret[i] = ec.marshalNInt2uint32(ctx, sel, v[i]) } + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -12142,11 +15161,7 @@ func (ec *executionContext) unmarshalOInt2ᚕuint64ᚄ(ctx context.Context, v in } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]uint64, len(vSlice)) @@ -12169,17 +15184,23 @@ func (ec *executionContext) marshalOInt2ᚕuint64ᚄ(ctx context.Context, sel as ret[i] = ec.marshalNInt2uint64(ctx, sel, v[i]) } + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) marshalOMaps2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps(ctx context.Context, sel ast.SelectionSet, v *pb.Maps) graphql.Marshaler { +func (ec *executionContext) marshalOMaps2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps(ctx context.Context, sel ast.SelectionSet, v *pb.Maps) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Maps(ctx, sel, v) } -func (ec *executionContext) unmarshalOMapsInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps(ctx context.Context, v interface{}) (*pb.Maps, error) { +func (ec *executionContext) unmarshalOMapsInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps(ctx context.Context, v interface{}) (*pb.Maps, error) { if v == nil { return nil, nil } @@ -12187,7 +15208,7 @@ func (ec *executionContext) unmarshalOMapsInput2ᚖgithubᚗcomᚋdanielvladco return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOMaps_BoolBoolEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_BoolBoolEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_BoolBoolEntry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_BoolBoolEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_BoolBoolEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_BoolBoolEntry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12214,7 +15235,7 @@ func (ec *executionContext) marshalOMaps_BoolBoolEntry2ᚕᚖgithubᚗcomᚋdani if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_BoolBoolEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_BoolBoolEntry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_BoolBoolEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_BoolBoolEntry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12224,26 +15245,29 @@ func (ec *executionContext) marshalOMaps_BoolBoolEntry2ᚕᚖgithubᚗcomᚋdani } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_BoolBoolEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_BoolBoolEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_BoolBoolEntry, error) { +func (ec *executionContext) unmarshalOMaps_BoolBoolEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_BoolBoolEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_BoolBoolEntry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_BoolBoolEntry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_BoolBoolEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_BoolBoolEntry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_BoolBoolEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_BoolBoolEntry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12251,7 +15275,7 @@ func (ec *executionContext) unmarshalOMaps_BoolBoolEntryInput2ᚕᚖgithubᚗcom return res, nil } -func (ec *executionContext) marshalOMaps_Fixed32Fixed32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed32Fixed32Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Fixed32Fixed32Entry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_Fixed32Fixed32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Fixed32Fixed32Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Fixed32Fixed32Entry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12278,7 +15302,7 @@ func (ec *executionContext) marshalOMaps_Fixed32Fixed32Entry2ᚕᚖgithubᚗcom if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_Fixed32Fixed32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed32Fixed32Entry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_Fixed32Fixed32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Fixed32Fixed32Entry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12288,26 +15312,29 @@ func (ec *executionContext) marshalOMaps_Fixed32Fixed32Entry2ᚕᚖgithubᚗcom } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_Fixed32Fixed32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed32Fixed32Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Fixed32Fixed32Entry, error) { +func (ec *executionContext) unmarshalOMaps_Fixed32Fixed32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Fixed32Fixed32Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Fixed32Fixed32Entry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_Fixed32Fixed32Entry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_Fixed32Fixed32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed32Fixed32Entry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_Fixed32Fixed32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Fixed32Fixed32Entry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12315,7 +15342,7 @@ func (ec *executionContext) unmarshalOMaps_Fixed32Fixed32EntryInput2ᚕᚖgithub return res, nil } -func (ec *executionContext) marshalOMaps_Fixed64Fixed64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed64Fixed64Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Fixed64Fixed64Entry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_Fixed64Fixed64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Fixed64Fixed64Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Fixed64Fixed64Entry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12342,7 +15369,7 @@ func (ec *executionContext) marshalOMaps_Fixed64Fixed64Entry2ᚕᚖgithubᚗcom if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_Fixed64Fixed64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed64Fixed64Entry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_Fixed64Fixed64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Fixed64Fixed64Entry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12352,26 +15379,29 @@ func (ec *executionContext) marshalOMaps_Fixed64Fixed64Entry2ᚕᚖgithubᚗcom } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_Fixed64Fixed64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed64Fixed64Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Fixed64Fixed64Entry, error) { +func (ec *executionContext) unmarshalOMaps_Fixed64Fixed64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Fixed64Fixed64Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Fixed64Fixed64Entry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_Fixed64Fixed64Entry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_Fixed64Fixed64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed64Fixed64Entry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_Fixed64Fixed64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Fixed64Fixed64Entry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12379,7 +15409,7 @@ func (ec *executionContext) unmarshalOMaps_Fixed64Fixed64EntryInput2ᚕᚖgithub return res, nil } -func (ec *executionContext) marshalOMaps_Int32Int32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int32Int32Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Int32Int32Entry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_Int32Int32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Int32Int32Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Int32Int32Entry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12406,7 +15436,7 @@ func (ec *executionContext) marshalOMaps_Int32Int32Entry2ᚕᚖgithubᚗcomᚋda if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_Int32Int32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int32Int32Entry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_Int32Int32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Int32Int32Entry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12416,26 +15446,29 @@ func (ec *executionContext) marshalOMaps_Int32Int32Entry2ᚕᚖgithubᚗcomᚋda } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_Int32Int32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int32Int32Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Int32Int32Entry, error) { +func (ec *executionContext) unmarshalOMaps_Int32Int32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Int32Int32Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Int32Int32Entry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_Int32Int32Entry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_Int32Int32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int32Int32Entry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_Int32Int32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Int32Int32Entry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12443,7 +15476,7 @@ func (ec *executionContext) unmarshalOMaps_Int32Int32EntryInput2ᚕᚖgithubᚗc return res, nil } -func (ec *executionContext) marshalOMaps_Int64Int64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int64Int64Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Int64Int64Entry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_Int64Int64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Int64Int64Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Int64Int64Entry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12470,7 +15503,7 @@ func (ec *executionContext) marshalOMaps_Int64Int64Entry2ᚕᚖgithubᚗcomᚋda if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_Int64Int64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int64Int64Entry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_Int64Int64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Int64Int64Entry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12480,26 +15513,29 @@ func (ec *executionContext) marshalOMaps_Int64Int64Entry2ᚕᚖgithubᚗcomᚋda } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_Int64Int64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int64Int64Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Int64Int64Entry, error) { +func (ec *executionContext) unmarshalOMaps_Int64Int64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Int64Int64Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Int64Int64Entry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_Int64Int64Entry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_Int64Int64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int64Int64Entry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_Int64Int64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Int64Int64Entry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12507,7 +15543,7 @@ func (ec *executionContext) unmarshalOMaps_Int64Int64EntryInput2ᚕᚖgithubᚗc return res, nil } -func (ec *executionContext) marshalOMaps_Sfixed32Sfixed32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed32Sfixed32Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Sfixed32Sfixed32Entry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_Sfixed32Sfixed32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sfixed32Sfixed32Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Sfixed32Sfixed32Entry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12534,7 +15570,7 @@ func (ec *executionContext) marshalOMaps_Sfixed32Sfixed32Entry2ᚕᚖgithubᚗco if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_Sfixed32Sfixed32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed32Sfixed32Entry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_Sfixed32Sfixed32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sfixed32Sfixed32Entry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12544,26 +15580,29 @@ func (ec *executionContext) marshalOMaps_Sfixed32Sfixed32Entry2ᚕᚖgithubᚗco } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_Sfixed32Sfixed32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed32Sfixed32Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Sfixed32Sfixed32Entry, error) { +func (ec *executionContext) unmarshalOMaps_Sfixed32Sfixed32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sfixed32Sfixed32Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Sfixed32Sfixed32Entry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_Sfixed32Sfixed32Entry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_Sfixed32Sfixed32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed32Sfixed32Entry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_Sfixed32Sfixed32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sfixed32Sfixed32Entry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12571,7 +15610,7 @@ func (ec *executionContext) unmarshalOMaps_Sfixed32Sfixed32EntryInput2ᚕᚖgith return res, nil } -func (ec *executionContext) marshalOMaps_Sfixed64Sfixed64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed64Sfixed64Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Sfixed64Sfixed64Entry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_Sfixed64Sfixed64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sfixed64Sfixed64Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Sfixed64Sfixed64Entry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12598,7 +15637,7 @@ func (ec *executionContext) marshalOMaps_Sfixed64Sfixed64Entry2ᚕᚖgithubᚗco if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_Sfixed64Sfixed64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed64Sfixed64Entry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_Sfixed64Sfixed64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sfixed64Sfixed64Entry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12608,26 +15647,29 @@ func (ec *executionContext) marshalOMaps_Sfixed64Sfixed64Entry2ᚕᚖgithubᚗco } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_Sfixed64Sfixed64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed64Sfixed64Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Sfixed64Sfixed64Entry, error) { +func (ec *executionContext) unmarshalOMaps_Sfixed64Sfixed64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sfixed64Sfixed64Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Sfixed64Sfixed64Entry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_Sfixed64Sfixed64Entry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_Sfixed64Sfixed64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed64Sfixed64Entry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_Sfixed64Sfixed64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sfixed64Sfixed64Entry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12635,7 +15677,7 @@ func (ec *executionContext) unmarshalOMaps_Sfixed64Sfixed64EntryInput2ᚕᚖgith return res, nil } -func (ec *executionContext) marshalOMaps_Sint32Sint32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint32Sint32Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Sint32Sint32Entry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_Sint32Sint32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sint32Sint32Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Sint32Sint32Entry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12662,7 +15704,7 @@ func (ec *executionContext) marshalOMaps_Sint32Sint32Entry2ᚕᚖgithubᚗcomᚋ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_Sint32Sint32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint32Sint32Entry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_Sint32Sint32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sint32Sint32Entry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12672,26 +15714,29 @@ func (ec *executionContext) marshalOMaps_Sint32Sint32Entry2ᚕᚖgithubᚗcomᚋ } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_Sint32Sint32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint32Sint32Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Sint32Sint32Entry, error) { +func (ec *executionContext) unmarshalOMaps_Sint32Sint32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sint32Sint32Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Sint32Sint32Entry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_Sint32Sint32Entry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_Sint32Sint32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint32Sint32Entry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_Sint32Sint32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sint32Sint32Entry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12699,7 +15744,7 @@ func (ec *executionContext) unmarshalOMaps_Sint32Sint32EntryInput2ᚕᚖgithub return res, nil } -func (ec *executionContext) marshalOMaps_Sint64Sint64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint64Sint64Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Sint64Sint64Entry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_Sint64Sint64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sint64Sint64Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Sint64Sint64Entry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12726,7 +15771,7 @@ func (ec *executionContext) marshalOMaps_Sint64Sint64Entry2ᚕᚖgithubᚗcomᚋ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_Sint64Sint64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint64Sint64Entry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_Sint64Sint64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sint64Sint64Entry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12736,26 +15781,29 @@ func (ec *executionContext) marshalOMaps_Sint64Sint64Entry2ᚕᚖgithubᚗcomᚋ } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_Sint64Sint64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint64Sint64Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Sint64Sint64Entry, error) { +func (ec *executionContext) unmarshalOMaps_Sint64Sint64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sint64Sint64Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Sint64Sint64Entry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_Sint64Sint64Entry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_Sint64Sint64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint64Sint64Entry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_Sint64Sint64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Sint64Sint64Entry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12763,7 +15811,7 @@ func (ec *executionContext) unmarshalOMaps_Sint64Sint64EntryInput2ᚕᚖgithub return res, nil } -func (ec *executionContext) marshalOMaps_StringBarEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBarEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringBarEntry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_StringBarEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringBarEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringBarEntry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12790,7 +15838,7 @@ func (ec *executionContext) marshalOMaps_StringBarEntry2ᚕᚖgithubᚗcomᚋdan if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_StringBarEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBarEntry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_StringBarEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringBarEntry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12800,26 +15848,29 @@ func (ec *executionContext) marshalOMaps_StringBarEntry2ᚕᚖgithubᚗcomᚋdan } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_StringBarEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBarEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringBarEntry, error) { +func (ec *executionContext) unmarshalOMaps_StringBarEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringBarEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringBarEntry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_StringBarEntry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_StringBarEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBarEntry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_StringBarEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringBarEntry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12827,7 +15878,7 @@ func (ec *executionContext) unmarshalOMaps_StringBarEntryInput2ᚕᚖgithubᚗco return res, nil } -func (ec *executionContext) marshalOMaps_StringBytesEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBytesEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringBytesEntry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_StringBytesEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringBytesEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringBytesEntry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12854,7 +15905,7 @@ func (ec *executionContext) marshalOMaps_StringBytesEntry2ᚕᚖgithubᚗcomᚋd if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_StringBytesEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBytesEntry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_StringBytesEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringBytesEntry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12864,26 +15915,29 @@ func (ec *executionContext) marshalOMaps_StringBytesEntry2ᚕᚖgithubᚗcomᚋd } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_StringBytesEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBytesEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringBytesEntry, error) { +func (ec *executionContext) unmarshalOMaps_StringBytesEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringBytesEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringBytesEntry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_StringBytesEntry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_StringBytesEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBytesEntry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_StringBytesEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringBytesEntry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12891,7 +15945,7 @@ func (ec *executionContext) unmarshalOMaps_StringBytesEntryInput2ᚕᚖgithubᚗ return res, nil } -func (ec *executionContext) marshalOMaps_StringDoubleEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringDoubleEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringDoubleEntry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_StringDoubleEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringDoubleEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringDoubleEntry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12918,7 +15972,7 @@ func (ec *executionContext) marshalOMaps_StringDoubleEntry2ᚕᚖgithubᚗcomᚋ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_StringDoubleEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringDoubleEntry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_StringDoubleEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringDoubleEntry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12928,26 +15982,29 @@ func (ec *executionContext) marshalOMaps_StringDoubleEntry2ᚕᚖgithubᚗcomᚋ } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_StringDoubleEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringDoubleEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringDoubleEntry, error) { +func (ec *executionContext) unmarshalOMaps_StringDoubleEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringDoubleEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringDoubleEntry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_StringDoubleEntry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_StringDoubleEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringDoubleEntry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_StringDoubleEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringDoubleEntry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -12955,7 +16012,7 @@ func (ec *executionContext) unmarshalOMaps_StringDoubleEntryInput2ᚕᚖgithub return res, nil } -func (ec *executionContext) marshalOMaps_StringFloatEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFloatEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringFloatEntry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_StringFloatEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringFloatEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringFloatEntry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -12982,7 +16039,7 @@ func (ec *executionContext) marshalOMaps_StringFloatEntry2ᚕᚖgithubᚗcomᚋd if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_StringFloatEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFloatEntry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_StringFloatEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringFloatEntry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -12992,26 +16049,29 @@ func (ec *executionContext) marshalOMaps_StringFloatEntry2ᚕᚖgithubᚗcomᚋd } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_StringFloatEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFloatEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringFloatEntry, error) { +func (ec *executionContext) unmarshalOMaps_StringFloatEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringFloatEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringFloatEntry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_StringFloatEntry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_StringFloatEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFloatEntry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_StringFloatEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringFloatEntry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -13019,7 +16079,7 @@ func (ec *executionContext) unmarshalOMaps_StringFloatEntryInput2ᚕᚖgithubᚗ return res, nil } -func (ec *executionContext) marshalOMaps_StringFooEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFooEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringFooEntry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_StringFooEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringFooEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringFooEntry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -13046,7 +16106,7 @@ func (ec *executionContext) marshalOMaps_StringFooEntry2ᚕᚖgithubᚗcomᚋdan if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_StringFooEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFooEntry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_StringFooEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringFooEntry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -13056,26 +16116,29 @@ func (ec *executionContext) marshalOMaps_StringFooEntry2ᚕᚖgithubᚗcomᚋdan } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_StringFooEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFooEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringFooEntry, error) { +func (ec *executionContext) unmarshalOMaps_StringFooEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringFooEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringFooEntry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_StringFooEntry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_StringFooEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFooEntry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_StringFooEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringFooEntry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -13083,7 +16146,7 @@ func (ec *executionContext) unmarshalOMaps_StringFooEntryInput2ᚕᚖgithubᚗco return res, nil } -func (ec *executionContext) marshalOMaps_StringStringEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringStringEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringStringEntry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_StringStringEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringStringEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringStringEntry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -13110,7 +16173,7 @@ func (ec *executionContext) marshalOMaps_StringStringEntry2ᚕᚖgithubᚗcomᚋ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_StringStringEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringStringEntry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_StringStringEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringStringEntry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -13120,26 +16183,29 @@ func (ec *executionContext) marshalOMaps_StringStringEntry2ᚕᚖgithubᚗcomᚋ } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_StringStringEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringStringEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringStringEntry, error) { +func (ec *executionContext) unmarshalOMaps_StringStringEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringStringEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringStringEntry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_StringStringEntry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_StringStringEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringStringEntry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_StringStringEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_StringStringEntry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -13147,7 +16213,7 @@ func (ec *executionContext) unmarshalOMaps_StringStringEntryInput2ᚕᚖgithub return res, nil } -func (ec *executionContext) marshalOMaps_Uint32Uint32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint32Uint32Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Uint32Uint32Entry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_Uint32Uint32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Uint32Uint32Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Uint32Uint32Entry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -13174,7 +16240,7 @@ func (ec *executionContext) marshalOMaps_Uint32Uint32Entry2ᚕᚖgithubᚗcomᚋ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_Uint32Uint32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint32Uint32Entry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_Uint32Uint32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Uint32Uint32Entry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -13184,26 +16250,29 @@ func (ec *executionContext) marshalOMaps_Uint32Uint32Entry2ᚕᚖgithubᚗcomᚋ } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_Uint32Uint32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint32Uint32Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Uint32Uint32Entry, error) { +func (ec *executionContext) unmarshalOMaps_Uint32Uint32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Uint32Uint32Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Uint32Uint32Entry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_Uint32Uint32Entry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_Uint32Uint32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint32Uint32Entry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_Uint32Uint32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Uint32Uint32Entry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -13211,7 +16280,7 @@ func (ec *executionContext) unmarshalOMaps_Uint32Uint32EntryInput2ᚕᚖgithub return res, nil } -func (ec *executionContext) marshalOMaps_Uint64Uint64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint64Uint64Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Uint64Uint64Entry) graphql.Marshaler { +func (ec *executionContext) marshalOMaps_Uint64Uint64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Uint64Uint64Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Uint64Uint64Entry) graphql.Marshaler { if v == nil { return graphql.Null } @@ -13238,7 +16307,7 @@ func (ec *executionContext) marshalOMaps_Uint64Uint64Entry2ᚕᚖgithubᚗcomᚋ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNMaps_Uint64Uint64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint64Uint64Entry(ctx, sel, v[i]) + ret[i] = ec.marshalNMaps_Uint64Uint64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Uint64Uint64Entry(ctx, sel, v[i]) } if isLen1 { f(i) @@ -13248,26 +16317,29 @@ func (ec *executionContext) marshalOMaps_Uint64Uint64Entry2ᚕᚖgithubᚗcomᚋ } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } -func (ec *executionContext) unmarshalOMaps_Uint64Uint64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint64Uint64Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Uint64Uint64Entry, error) { +func (ec *executionContext) unmarshalOMaps_Uint64Uint64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Uint64Uint64Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Uint64Uint64Entry, error) { if v == nil { return nil, nil } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]*pb.Maps_Uint64Uint64Entry, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNMaps_Uint64Uint64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint64Uint64Entry(ctx, vSlice[i]) + res[i], err = ec.unmarshalNMaps_Uint64Uint64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐMaps_Uint64Uint64Entry(ctx, vSlice[i]) if err != nil { return nil, err } @@ -13275,14 +16347,14 @@ func (ec *executionContext) unmarshalOMaps_Uint64Uint64EntryInput2ᚕᚖgithub return res, nil } -func (ec *executionContext) marshalOOneof2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof(ctx context.Context, sel ast.SelectionSet, v *pb.Oneof) graphql.Marshaler { +func (ec *executionContext) marshalOOneof2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐOneof(ctx context.Context, sel ast.SelectionSet, v *pb.Oneof) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Oneof(ctx, sel, v) } -func (ec *executionContext) unmarshalOOneofInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof(ctx context.Context, v interface{}) (*pb.Oneof, error) { +func (ec *executionContext) unmarshalOOneofInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐOneof(ctx context.Context, v interface{}) (*pb.Oneof, error) { if v == nil { return nil, nil } @@ -13290,42 +16362,42 @@ func (ec *executionContext) unmarshalOOneofInput2ᚖgithubᚗcomᚋdanielvladco return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOOneof_Oneof12githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof_Oneof1(ctx context.Context, sel ast.SelectionSet, v pb.Oneof_Oneof1) graphql.Marshaler { +func (ec *executionContext) marshalOOneof_Oneof12githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐOneof_Oneof1(ctx context.Context, sel ast.SelectionSet, v pb.Oneof_Oneof1) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Oneof_Oneof1(ctx, sel, v) } -func (ec *executionContext) marshalOOneof_Oneof22githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof_Oneof2(ctx context.Context, sel ast.SelectionSet, v pb.Oneof_Oneof2) graphql.Marshaler { +func (ec *executionContext) marshalOOneof_Oneof22githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐOneof_Oneof2(ctx context.Context, sel ast.SelectionSet, v pb.Oneof_Oneof2) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Oneof_Oneof2(ctx, sel, v) } -func (ec *executionContext) marshalOOneof_Oneof32githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof_Oneof3(ctx context.Context, sel ast.SelectionSet, v pb.Oneof_Oneof3) graphql.Marshaler { +func (ec *executionContext) marshalOOneof_Oneof32githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐOneof_Oneof3(ctx context.Context, sel ast.SelectionSet, v pb.Oneof_Oneof3) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Oneof_Oneof3(ctx, sel, v) } -func (ec *executionContext) marshalOPb_Any2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐAny(ctx context.Context, sel ast.SelectionSet, v *pb.Any) graphql.Marshaler { +func (ec *executionContext) marshalOPb_Any2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐAny(ctx context.Context, sel ast.SelectionSet, v *pb.Any) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Pb_Any(ctx, sel, v) } -func (ec *executionContext) marshalORef2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef(ctx context.Context, sel ast.SelectionSet, v *pb.Ref) graphql.Marshaler { +func (ec *executionContext) marshalORef2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef(ctx context.Context, sel ast.SelectionSet, v *pb.Ref) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Ref(ctx, sel, v) } -func (ec *executionContext) unmarshalORefInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef(ctx context.Context, v interface{}) (*pb.Ref, error) { +func (ec *executionContext) unmarshalORefInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef(ctx context.Context, v interface{}) (*pb.Ref, error) { if v == nil { return nil, nil } @@ -13333,14 +16405,14 @@ func (ec *executionContext) unmarshalORefInput2ᚖgithubᚗcomᚋdanielvladcoᚋ return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalORef_Bar2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Bar(ctx context.Context, sel ast.SelectionSet, v *pb.Ref_Bar) graphql.Marshaler { +func (ec *executionContext) marshalORef_Bar2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Bar(ctx context.Context, sel ast.SelectionSet, v *pb.Ref_Bar) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Ref_Bar(ctx, sel, v) } -func (ec *executionContext) unmarshalORef_BarInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Bar(ctx context.Context, v interface{}) (*pb.Ref_Bar, error) { +func (ec *executionContext) unmarshalORef_BarInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Bar(ctx context.Context, v interface{}) (*pb.Ref_Bar, error) { if v == nil { return nil, nil } @@ -13348,14 +16420,14 @@ func (ec *executionContext) unmarshalORef_BarInput2ᚖgithubᚗcomᚋdanielvladc return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalORef_Foo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo(ctx context.Context, sel ast.SelectionSet, v *pb.Ref_Foo) graphql.Marshaler { +func (ec *executionContext) marshalORef_Foo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo(ctx context.Context, sel ast.SelectionSet, v *pb.Ref_Foo) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Ref_Foo(ctx, sel, v) } -func (ec *executionContext) unmarshalORef_FooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo(ctx context.Context, v interface{}) (*pb.Ref_Foo, error) { +func (ec *executionContext) unmarshalORef_FooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo(ctx context.Context, v interface{}) (*pb.Ref_Foo, error) { if v == nil { return nil, nil } @@ -13363,14 +16435,14 @@ func (ec *executionContext) unmarshalORef_FooInput2ᚖgithubᚗcomᚋdanielvladc return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalORef_Foo_Bar2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar(ctx context.Context, sel ast.SelectionSet, v *pb.Ref_Foo_Bar) graphql.Marshaler { +func (ec *executionContext) marshalORef_Foo_Bar2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_Bar(ctx context.Context, sel ast.SelectionSet, v *pb.Ref_Foo_Bar) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Ref_Foo_Bar(ctx, sel, v) } -func (ec *executionContext) unmarshalORef_Foo_BarInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar(ctx context.Context, v interface{}) (*pb.Ref_Foo_Bar, error) { +func (ec *executionContext) unmarshalORef_Foo_BarInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_Bar(ctx context.Context, v interface{}) (*pb.Ref_Foo_Bar, error) { if v == nil { return nil, nil } @@ -13378,23 +16450,24 @@ func (ec *executionContext) unmarshalORef_Foo_BarInput2ᚖgithubᚗcomᚋdanielv return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar_En(ctx context.Context, v interface{}) (pb.Ref_Foo_Bar_En, error) { +func (ec *executionContext) unmarshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_Bar_En(ctx context.Context, v interface{}) (pb.Ref_Foo_Bar_En, error) { res, err := pb.UnmarshalRef_Foo_Bar_En(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar_En(ctx context.Context, sel ast.SelectionSet, v pb.Ref_Foo_Bar_En) graphql.Marshaler { - return pb.MarshalRef_Foo_Bar_En(v) +func (ec *executionContext) marshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_Bar_En(ctx context.Context, sel ast.SelectionSet, v pb.Ref_Foo_Bar_En) graphql.Marshaler { + res := pb.MarshalRef_Foo_Bar_En(v) + return res } -func (ec *executionContext) marshalORef_Foo_Baz_Gz2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Baz_Gz(ctx context.Context, sel ast.SelectionSet, v *pb.Ref_Foo_Baz_Gz) graphql.Marshaler { +func (ec *executionContext) marshalORef_Foo_Baz_Gz2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_Baz_Gz(ctx context.Context, sel ast.SelectionSet, v *pb.Ref_Foo_Baz_Gz) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Ref_Foo_Baz_Gz(ctx, sel, v) } -func (ec *executionContext) unmarshalORef_Foo_Baz_GzInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Baz_Gz(ctx context.Context, v interface{}) (*pb.Ref_Foo_Baz_Gz, error) { +func (ec *executionContext) unmarshalORef_Foo_Baz_GzInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_Baz_Gz(ctx context.Context, v interface{}) (*pb.Ref_Foo_Baz_Gz, error) { if v == nil { return nil, nil } @@ -13402,23 +16475,24 @@ func (ec *executionContext) unmarshalORef_Foo_Baz_GzInput2ᚖgithubᚗcomᚋdani return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_En(ctx context.Context, v interface{}) (pb.Ref_Foo_En, error) { +func (ec *executionContext) unmarshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_En(ctx context.Context, v interface{}) (pb.Ref_Foo_En, error) { res, err := pb.UnmarshalRef_Foo_En(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_En(ctx context.Context, sel ast.SelectionSet, v pb.Ref_Foo_En) graphql.Marshaler { - return pb.MarshalRef_Foo_En(v) +func (ec *executionContext) marshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRef_Foo_En(ctx context.Context, sel ast.SelectionSet, v pb.Ref_Foo_En) graphql.Marshaler { + res := pb.MarshalRef_Foo_En(v) + return res } -func (ec *executionContext) marshalORepeated2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRepeated(ctx context.Context, sel ast.SelectionSet, v *pb.Repeated) graphql.Marshaler { +func (ec *executionContext) marshalORepeated2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRepeated(ctx context.Context, sel ast.SelectionSet, v *pb.Repeated) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Repeated(ctx, sel, v) } -func (ec *executionContext) unmarshalORepeatedInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRepeated(ctx context.Context, v interface{}) (*pb.Repeated, error) { +func (ec *executionContext) unmarshalORepeatedInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐRepeated(ctx context.Context, v interface{}) (*pb.Repeated, error) { if v == nil { return nil, nil } @@ -13426,14 +16500,14 @@ func (ec *executionContext) unmarshalORepeatedInput2ᚖgithubᚗcomᚋdanielvlad return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOScalars2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐScalars(ctx context.Context, sel ast.SelectionSet, v *pb.Scalars) graphql.Marshaler { +func (ec *executionContext) marshalOScalars2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐScalars(ctx context.Context, sel ast.SelectionSet, v *pb.Scalars) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Scalars(ctx, sel, v) } -func (ec *executionContext) unmarshalOScalarsInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐScalars(ctx context.Context, v interface{}) (*pb.Scalars, error) { +func (ec *executionContext) unmarshalOScalarsInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐScalars(ctx context.Context, v interface{}) (*pb.Scalars, error) { if v == nil { return nil, nil } @@ -13447,7 +16521,8 @@ func (ec *executionContext) unmarshalOString2string(ctx context.Context, v inter } func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { - return graphql.MarshalString(v) + res := graphql.MarshalString(v) + return res } func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { @@ -13456,11 +16531,7 @@ func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v } var vSlice []interface{} if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } + vSlice = graphql.CoerceList(v) } var err error res := make([]string, len(vSlice)) @@ -13483,6 +16554,12 @@ func (ec *executionContext) marshalOString2ᚕstringᚄ(ctx context.Context, sel ret[i] = ec.marshalNString2string(ctx, sel, v[i]) } + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -13498,17 +16575,18 @@ func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel as if v == nil { return graphql.Null } - return graphql.MarshalString(*v) + res := graphql.MarshalString(*v) + return res } -func (ec *executionContext) marshalOTimestamp2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐTimestamp(ctx context.Context, sel ast.SelectionSet, v *pb.Timestamp) graphql.Marshaler { +func (ec *executionContext) marshalOTimestamp2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐTimestamp(ctx context.Context, sel ast.SelectionSet, v *pb.Timestamp) graphql.Marshaler { if v == nil { return graphql.Null } return ec._Timestamp(ctx, sel, v) } -func (ec *executionContext) unmarshalOTimestampInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐTimestamp(ctx context.Context, v interface{}) (*pb.Timestamp, error) { +func (ec *executionContext) unmarshalOTimestampInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐTimestamp(ctx context.Context, v interface{}) (*pb.Timestamp, error) { if v == nil { return nil, nil } @@ -13553,6 +16631,13 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgq } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -13593,6 +16678,13 @@ func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgen } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -13633,6 +16725,13 @@ func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋg } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } @@ -13680,6 +16779,13 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen } wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + return ret } diff --git a/example/codegen/api/graphql/options/generated.go b/example/codegen/api/graphql/options/generated.go new file mode 100644 index 0000000..9f41d08 --- /dev/null +++ b/example/codegen/api/graphql/options/generated.go @@ -0,0 +1,7004 @@ +// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. + +package options + +import ( + "bytes" + "context" + "errors" + "fmt" + "io" + "strconv" + "sync" + "sync/atomic" + + "github.com/99designs/gqlgen/graphql" + "github.com/99designs/gqlgen/graphql/introspection" + "github.com/danielvladco/go-proto-gql/example/codegen/api/pb" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" +) + +// region ************************** generated!.gotpl ************************** + +// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. +func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { + return &executableSchema{ + resolvers: cfg.Resolvers, + directives: cfg.Directives, + complexity: cfg.Complexity, + } +} + +type Config struct { + Resolvers ResolverRoot + Directives DirectiveRoot + Complexity ComplexityRoot +} + +type ResolverRoot interface { + Data() DataResolver + Mutation() MutationResolver + Query() QueryResolver + Subscription() SubscriptionResolver + DataInput() DataInputResolver +} + +type DirectiveRoot struct { + Data_Oneof func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) + Query func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) + Service func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) + Test func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) +} + +type ComplexityRoot struct { + Data struct { + Bar func(childComplexity int) int + Double func(childComplexity int) int + Double2 func(childComplexity int) int + Foo func(childComplexity int) int + Foo2 func(childComplexity int) int + Oneof3 func(childComplexity int) int + String2 func(childComplexity int) int + StringX func(childComplexity int) int + String_ func(childComplexity int) int + } + + Data_Param1 struct { + Param1 func(childComplexity int) int + } + + Data_Param2 struct { + Param2 func(childComplexity int) int + } + + Foo2 struct { + Param1 func(childComplexity int) int + } + + Mutation struct { + Name func(childComplexity int, in *pb.Data) int + NewName func(childComplexity int, in *pb.Data) int + NewName0 func(childComplexity int, in *pb.Data) int + QueryMutate1 func(childComplexity int, in *pb.Data) int + ServiceInvalidSubscribe3 func(childComplexity int, in *pb.Data) int + ServiceMutate1 func(childComplexity int, in *pb.Data) int + ServiceMutate2 func(childComplexity int, in *pb.Data) int + ServicePubSub1 func(childComplexity int, in *pb.Data) int + ServicePubSub2 func(childComplexity int, in *pb.Data) int + ServicePublish func(childComplexity int, in *pb.Data) int + } + + Query struct { + QueryQuery1 func(childComplexity int, in *pb.Data) int + QueryQuery2 func(childComplexity int, in *pb.Data) int + ServiceInvalidSubscribe1 func(childComplexity int, in *pb.Data) int + ServiceQuery1 func(childComplexity int, in *pb.Data) int + } + + Subscription struct { + QuerySubscribe func(childComplexity int, in *pb.Data) int + ServiceInvalidSubscribe2 func(childComplexity int, in *pb.Data) int + ServiceInvalidSubscribe3 func(childComplexity int, in *pb.Data) int + ServicePubSub1 func(childComplexity int, in *pb.Data) int + ServicePubSub2 func(childComplexity int, in *pb.Data) int + ServiceSubscribe func(childComplexity int, in *pb.Data) int + } +} + +type DataResolver interface { + Oneof3(ctx context.Context, obj *pb.Data) (pb.Data_Oneof, error) +} +type MutationResolver interface { + ServiceMutate1(ctx context.Context, in *pb.Data) (*pb.Data, error) + ServiceMutate2(ctx context.Context, in *pb.Data) (*pb.Data, error) + ServicePublish(ctx context.Context, in *pb.Data) (*pb.Data, error) + ServicePubSub1(ctx context.Context, in *pb.Data) (*pb.Data, error) + ServiceInvalidSubscribe3(ctx context.Context, in *pb.Data) (*pb.Data, error) + ServicePubSub2(ctx context.Context, in *pb.Data) (*pb.Data, error) + NewName(ctx context.Context, in *pb.Data) (*pb.Data, error) + Name(ctx context.Context, in *pb.Data) (*pb.Data, error) + NewName0(ctx context.Context, in *pb.Data) (*pb.Data, error) + QueryMutate1(ctx context.Context, in *pb.Data) (*pb.Data, error) +} +type QueryResolver interface { + ServiceQuery1(ctx context.Context, in *pb.Data) (*pb.Data, error) + ServiceInvalidSubscribe1(ctx context.Context, in *pb.Data) (*pb.Data, error) + QueryQuery1(ctx context.Context, in *pb.Data) (*pb.Data, error) + QueryQuery2(ctx context.Context, in *pb.Data) (*pb.Data, error) +} +type SubscriptionResolver interface { + ServiceSubscribe(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) + ServicePubSub1(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) + ServiceInvalidSubscribe2(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) + ServiceInvalidSubscribe3(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) + ServicePubSub2(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) + QuerySubscribe(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) +} + +type DataInputResolver interface { + Param1(ctx context.Context, obj *pb.Data, data *string) error + Param2(ctx context.Context, obj *pb.Data, data *string) error +} + +type executableSchema struct { + resolvers ResolverRoot + directives DirectiveRoot + complexity ComplexityRoot +} + +func (e *executableSchema) Schema() *ast.Schema { + return parsedSchema +} + +func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) { + ec := executionContext{nil, e} + _ = ec + switch typeName + "." + field { + + case "Data.bars": + if e.complexity.Data.Bar == nil { + break + } + + return e.complexity.Data.Bar(childComplexity), true + + case "Data.double": + if e.complexity.Data.Double == nil { + break + } + + return e.complexity.Data.Double(childComplexity), true + + case "Data.double2": + if e.complexity.Data.Double2 == nil { + break + } + + return e.complexity.Data.Double2(childComplexity), true + + case "Data.foo": + if e.complexity.Data.Foo == nil { + break + } + + return e.complexity.Data.Foo(childComplexity), true + + case "Data.foo2": + if e.complexity.Data.Foo2 == nil { + break + } + + return e.complexity.Data.Foo2(childComplexity), true + + case "Data.Oneof3": + if e.complexity.Data.Oneof3 == nil { + break + } + + return e.complexity.Data.Oneof3(childComplexity), true + + case "Data.string2": + if e.complexity.Data.String2 == nil { + break + } + + return e.complexity.Data.String2(childComplexity), true + + case "Data.stringX": + if e.complexity.Data.StringX == nil { + break + } + + return e.complexity.Data.StringX(childComplexity), true + + case "Data.str": + if e.complexity.Data.String_ == nil { + break + } + + return e.complexity.Data.String_(childComplexity), true + + case "Data_Param1.param1": + if e.complexity.Data_Param1.Param1 == nil { + break + } + + return e.complexity.Data_Param1.Param1(childComplexity), true + + case "Data_Param2.param2": + if e.complexity.Data_Param2.Param2 == nil { + break + } + + return e.complexity.Data_Param2.Param2(childComplexity), true + + case "Foo2.param1": + if e.complexity.Foo2.Param1 == nil { + break + } + + return e.complexity.Foo2.Param1(childComplexity), true + + case "Mutation.name": + if e.complexity.Mutation.Name == nil { + break + } + + args, err := ec.field_Mutation_name_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.Name(childComplexity, args["in"].(*pb.Data)), true + + case "Mutation.newName": + if e.complexity.Mutation.NewName == nil { + break + } + + args, err := ec.field_Mutation_newName_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.NewName(childComplexity, args["in"].(*pb.Data)), true + + case "Mutation.newName0": + if e.complexity.Mutation.NewName0 == nil { + break + } + + args, err := ec.field_Mutation_newName0_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.NewName0(childComplexity, args["in"].(*pb.Data)), true + + case "Mutation.queryMutate1": + if e.complexity.Mutation.QueryMutate1 == nil { + break + } + + args, err := ec.field_Mutation_queryMutate1_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.QueryMutate1(childComplexity, args["in"].(*pb.Data)), true + + case "Mutation.serviceInvalidSubscribe3": + if e.complexity.Mutation.ServiceInvalidSubscribe3 == nil { + break + } + + args, err := ec.field_Mutation_serviceInvalidSubscribe3_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ServiceInvalidSubscribe3(childComplexity, args["in"].(*pb.Data)), true + + case "Mutation.serviceMutate1": + if e.complexity.Mutation.ServiceMutate1 == nil { + break + } + + args, err := ec.field_Mutation_serviceMutate1_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ServiceMutate1(childComplexity, args["in"].(*pb.Data)), true + + case "Mutation.serviceMutate2": + if e.complexity.Mutation.ServiceMutate2 == nil { + break + } + + args, err := ec.field_Mutation_serviceMutate2_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ServiceMutate2(childComplexity, args["in"].(*pb.Data)), true + + case "Mutation.servicePubSub1": + if e.complexity.Mutation.ServicePubSub1 == nil { + break + } + + args, err := ec.field_Mutation_servicePubSub1_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ServicePubSub1(childComplexity, args["in"].(*pb.Data)), true + + case "Mutation.servicePubSub2": + if e.complexity.Mutation.ServicePubSub2 == nil { + break + } + + args, err := ec.field_Mutation_servicePubSub2_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ServicePubSub2(childComplexity, args["in"].(*pb.Data)), true + + case "Mutation.servicePublish": + if e.complexity.Mutation.ServicePublish == nil { + break + } + + args, err := ec.field_Mutation_servicePublish_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ServicePublish(childComplexity, args["in"].(*pb.Data)), true + + case "Query.queryQuery1": + if e.complexity.Query.QueryQuery1 == nil { + break + } + + args, err := ec.field_Query_queryQuery1_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.QueryQuery1(childComplexity, args["in"].(*pb.Data)), true + + case "Query.queryQuery2": + if e.complexity.Query.QueryQuery2 == nil { + break + } + + args, err := ec.field_Query_queryQuery2_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.QueryQuery2(childComplexity, args["in"].(*pb.Data)), true + + case "Query.serviceInvalidSubscribe1": + if e.complexity.Query.ServiceInvalidSubscribe1 == nil { + break + } + + args, err := ec.field_Query_serviceInvalidSubscribe1_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.ServiceInvalidSubscribe1(childComplexity, args["in"].(*pb.Data)), true + + case "Query.serviceQuery1": + if e.complexity.Query.ServiceQuery1 == nil { + break + } + + args, err := ec.field_Query_serviceQuery1_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.ServiceQuery1(childComplexity, args["in"].(*pb.Data)), true + + case "Subscription.querySubscribe": + if e.complexity.Subscription.QuerySubscribe == nil { + break + } + + args, err := ec.field_Subscription_querySubscribe_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Subscription.QuerySubscribe(childComplexity, args["in"].(*pb.Data)), true + + case "Subscription.serviceInvalidSubscribe2": + if e.complexity.Subscription.ServiceInvalidSubscribe2 == nil { + break + } + + args, err := ec.field_Subscription_serviceInvalidSubscribe2_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Subscription.ServiceInvalidSubscribe2(childComplexity, args["in"].(*pb.Data)), true + + case "Subscription.serviceInvalidSubscribe3": + if e.complexity.Subscription.ServiceInvalidSubscribe3 == nil { + break + } + + args, err := ec.field_Subscription_serviceInvalidSubscribe3_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Subscription.ServiceInvalidSubscribe3(childComplexity, args["in"].(*pb.Data)), true + + case "Subscription.servicePubSub1": + if e.complexity.Subscription.ServicePubSub1 == nil { + break + } + + args, err := ec.field_Subscription_servicePubSub1_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Subscription.ServicePubSub1(childComplexity, args["in"].(*pb.Data)), true + + case "Subscription.servicePubSub2": + if e.complexity.Subscription.ServicePubSub2 == nil { + break + } + + args, err := ec.field_Subscription_servicePubSub2_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Subscription.ServicePubSub2(childComplexity, args["in"].(*pb.Data)), true + + case "Subscription.serviceSubscribe": + if e.complexity.Subscription.ServiceSubscribe == nil { + break + } + + args, err := ec.field_Subscription_serviceSubscribe_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Subscription.ServiceSubscribe(childComplexity, args["in"].(*pb.Data)), true + + } + return 0, false +} + +func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { + rc := graphql.GetOperationContext(ctx) + ec := executionContext{rc, e} + inputUnmarshalMap := graphql.BuildUnmarshalerMap( + ec.unmarshalInputDataInput, + ec.unmarshalInputFoo2Input, + ) + first := true + + switch rc.Operation.Operation { + case ast.Query: + return func(ctx context.Context) *graphql.Response { + if !first { + return nil + } + first = false + ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) + data := ec._Query(ctx, rc.Operation.SelectionSet) + var buf bytes.Buffer + data.MarshalGQL(&buf) + + return &graphql.Response{ + Data: buf.Bytes(), + } + } + case ast.Mutation: + return func(ctx context.Context) *graphql.Response { + if !first { + return nil + } + first = false + ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) + data := ec._Mutation(ctx, rc.Operation.SelectionSet) + var buf bytes.Buffer + data.MarshalGQL(&buf) + + return &graphql.Response{ + Data: buf.Bytes(), + } + } + case ast.Subscription: + next := ec._Subscription(ctx, rc.Operation.SelectionSet) + + var buf bytes.Buffer + return func(ctx context.Context) *graphql.Response { + buf.Reset() + data := next(ctx) + + if data == nil { + return nil + } + data.MarshalGQL(&buf) + + return &graphql.Response{ + Data: buf.Bytes(), + } + } + + default: + return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation")) + } +} + +type executionContext struct { + *graphql.OperationContext + *executableSchema +} + +func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { + if ec.DisableIntrospection { + return nil, errors.New("introspection disabled") + } + return introspection.WrapSchema(parsedSchema), nil +} + +func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { + if ec.DisableIntrospection { + return nil, errors.New("introspection disabled") + } + return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil +} + +var sources = []*ast.Source{ + {Name: "../../pb/options.graphql", Input: `directive @Data_Oneof on INPUT_FIELD_DEFINITION +directive @Query on FIELD_DEFINITION +directive @Service on FIELD_DEFINITION +directive @Test on FIELD_DEFINITION +directive @goField(forceResolver: Boolean, name: String) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION +type Data { + """ + must be required + + """ + stringX: String! + """ + must be required + + """ + foo: Foo2! + """ + must be required because its greater than 0 + + """ + double: [Float!]! + """ + simple + + """ + string2: String + """ + simple + + """ + foo2: Foo2 + """ + simple + + """ + double2: [Float!] + bars: String @goField(name: "Bar") + str: String @goField(name: "String_") + Oneof3: Data_Oneof +} +input DataInput { + """ + must be required + + """ + stringX: String! + """ + must be required + + """ + foo: Foo2Input! + """ + must be required because its greater than 0 + + """ + double: [Float!]! + """ + simple + + """ + string2: String + """ + simple + + """ + foo2: Foo2Input + """ + simple + + """ + double2: [Float!] + bars: String @goField(name: "Bar") + str: String @goField(name: "String_") + param1: String @Data_Oneof + param2: String @Data_Oneof +} +union Data_Oneof = Data_Param1 | Data_Param2 +type Data_Param1 { + param1: String +} +type Data_Param2 { + param2: String +} +type Foo2 { + param1: String +} +input Foo2Input { + param1: String +} +type Mutation { + """ + must be a mutation + + """ + serviceMutate1(in: DataInput): Data @Service + """ + must be a mutation + + """ + serviceMutate2(in: DataInput): Data @Service + """ + must be a mutation + + """ + servicePublish(in: DataInput): Data @Service + """ + must be a mutation and a subscription + + """ + servicePubSub1(in: DataInput): Data @Service + serviceInvalidSubscribe3(in: DataInput): Data @Service + servicePubSub2(in: DataInput): Data @Service + newName(in: DataInput): Data @Service + """ + expect service name to be "name" + + """ + name(in: DataInput): Data @Test + """ + expect service name to be "newName1" since it collides with a name from a different service + + """ + newName0(in: DataInput): Data @Test + queryMutate1(in: DataInput): Data @Query +} +type Query { + serviceQuery1(in: DataInput): Data @Service + serviceInvalidSubscribe1(in: DataInput): Data @Service + """ + must be a query + + """ + queryQuery1(in: DataInput): Data @Query + """ + must be a query + + """ + queryQuery2(in: DataInput): Data @Query +} +type Subscription { + """ + must be a subscription + + """ + serviceSubscribe(in: DataInput): Data @Service + """ + must be a mutation and a subscription + + """ + servicePubSub1(in: DataInput): Data @Service + serviceInvalidSubscribe2(in: DataInput): Data @Service + serviceInvalidSubscribe3(in: DataInput): Data @Service + servicePubSub2(in: DataInput): Data @Service + """ + must be a subscription + + """ + querySubscribe(in: DataInput): Data @Query +} +`, BuiltIn: false}, +} +var parsedSchema = gqlparser.MustLoadSchema(sources...) + +// endregion ************************** generated!.gotpl ************************** + +// region ***************************** args.gotpl ***************************** + +func (ec *executionContext) field_Mutation_name_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_newName0_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_newName_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_queryMutate1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_serviceInvalidSubscribe3_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_serviceMutate1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_serviceMutate2_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_servicePubSub1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_servicePubSub2_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_servicePublish_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Query_queryQuery1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Query_queryQuery2_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Query_serviceInvalidSubscribe1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Query_serviceQuery1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Subscription_querySubscribe_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Subscription_serviceInvalidSubscribe2_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Subscription_serviceInvalidSubscribe3_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Subscription_servicePubSub1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Subscription_servicePubSub2_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Subscription_serviceSubscribe_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 bool + if tmp, ok := rawArgs["includeDeprecated"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) + if err != nil { + return nil, err + } + } + args["includeDeprecated"] = arg0 + return args, nil +} + +func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 bool + if tmp, ok := rawArgs["includeDeprecated"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) + if err != nil { + return nil, err + } + } + args["includeDeprecated"] = arg0 + return args, nil +} + +// endregion ***************************** args.gotpl ***************************** + +// region ************************** directives.gotpl ************************** + +// endregion ************************** directives.gotpl ************************** + +// region **************************** field.gotpl ***************************** + +func (ec *executionContext) _Data_stringX(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_stringX(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.StringX, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Data_stringX(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Data", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Data_foo(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_foo(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Foo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*pb.Foo2) + fc.Result = res + return ec.marshalNFoo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo2(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Data_foo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Data", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "param1": + return ec.fieldContext_Foo2_param1(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Foo2", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Data_double(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_double(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Double, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]float64) + fc.Result = res + return ec.marshalNFloat2ᚕfloat64ᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Data_double(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Data", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Data_string2(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_string2(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.String2, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Data_string2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Data", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Data_foo2(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_foo2(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Foo2, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Foo2) + fc.Result = res + return ec.marshalOFoo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo2(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Data_foo2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Data", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "param1": + return ec.fieldContext_Foo2_param1(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Foo2", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Data_double2(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_double2(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Double2, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]float64) + fc.Result = res + return ec.marshalOFloat2ᚕfloat64ᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Data_double2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Data", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Float does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Data_bars(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_bars(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Bar, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Data_bars(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Data", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Data_str(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_str(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.String_, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Data_str(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Data", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Data_Oneof3(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_Oneof3(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Data().Oneof3(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(pb.Data_Oneof) + fc.Result = res + return ec.marshalOData_Oneof2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData_Oneof(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Data_Oneof3(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Data", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Data_Oneof does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Data_Param1_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Data_Param1) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_Param1_param1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param1, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Data_Param1_param1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Data_Param1", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Data_Param2_param2(ctx context.Context, field graphql.CollectedField, obj *pb.Data_Param2) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Data_Param2_param2(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param2, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Data_Param2_param2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Data_Param2", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Foo2_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Foo2) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Foo2_param1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param1, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Foo2_param1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Foo2", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Mutation_serviceMutate1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_serviceMutate1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ServiceMutate1(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_serviceMutate1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_serviceMutate1_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_serviceMutate2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_serviceMutate2(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ServiceMutate2(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_serviceMutate2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_serviceMutate2_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_servicePublish(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_servicePublish(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ServicePublish(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_servicePublish(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_servicePublish_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_servicePubSub1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_servicePubSub1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ServicePubSub1(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_servicePubSub1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_servicePubSub1_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_serviceInvalidSubscribe3(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_serviceInvalidSubscribe3(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ServiceInvalidSubscribe3(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_serviceInvalidSubscribe3(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_serviceInvalidSubscribe3_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_servicePubSub2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_servicePubSub2(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ServicePubSub2(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_servicePubSub2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_servicePubSub2_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_newName(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_newName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().NewName(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_newName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_newName_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_name(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().Name(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Test == nil { + return nil, errors.New("directive Test is not implemented") + } + return ec.directives.Test(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_name_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_newName0(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_newName0(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().NewName0(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Test == nil { + return nil, errors.New("directive Test is not implemented") + } + return ec.directives.Test(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_newName0(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_newName0_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Mutation_queryMutate1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_queryMutate1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().QueryMutate1(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Query == nil { + return nil, errors.New("directive Query is not implemented") + } + return ec.directives.Query(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_queryMutate1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_queryMutate1_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_serviceQuery1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_serviceQuery1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().ServiceQuery1(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_serviceQuery1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_serviceQuery1_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_serviceInvalidSubscribe1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_serviceInvalidSubscribe1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().ServiceInvalidSubscribe1(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_serviceInvalidSubscribe1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_serviceInvalidSubscribe1_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_queryQuery1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_queryQuery1(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().QueryQuery1(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Query == nil { + return nil, errors.New("directive Query is not implemented") + } + return ec.directives.Query(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_queryQuery1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_queryQuery1_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query_queryQuery2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_queryQuery2(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().QueryQuery2(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Query == nil { + return nil, errors.New("directive Query is not implemented") + } + return ec.directives.Query(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_queryQuery2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_queryQuery2_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query___type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.introspectType(fc.Args["name"].(string)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query___schema(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.introspectSchema() + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Schema) + fc.Result = res + return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "description": + return ec.fieldContext___Schema_description(ctx, field) + case "types": + return ec.fieldContext___Schema_types(ctx, field) + case "queryType": + return ec.fieldContext___Schema_queryType(ctx, field) + case "mutationType": + return ec.fieldContext___Schema_mutationType(ctx, field) + case "subscriptionType": + return ec.fieldContext___Schema_subscriptionType(ctx, field) + case "directives": + return ec.fieldContext___Schema_directives(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Subscription_serviceSubscribe(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_serviceSubscribe(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().ServiceSubscribe(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(<-chan *pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan *pb.Data): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_serviceSubscribe(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_serviceSubscribe_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_servicePubSub1(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_servicePubSub1(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().ServicePubSub1(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(<-chan *pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan *pb.Data): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_servicePubSub1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_servicePubSub1_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_serviceInvalidSubscribe2(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_serviceInvalidSubscribe2(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().ServiceInvalidSubscribe2(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(<-chan *pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan *pb.Data): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_serviceInvalidSubscribe2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_serviceInvalidSubscribe2_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_serviceInvalidSubscribe3(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_serviceInvalidSubscribe3(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().ServiceInvalidSubscribe3(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(<-chan *pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan *pb.Data): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_serviceInvalidSubscribe3(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_serviceInvalidSubscribe3_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_servicePubSub2(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_servicePubSub2(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().ServicePubSub2(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(<-chan *pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan *pb.Data): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_servicePubSub2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_servicePubSub2_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) _Subscription_querySubscribe(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { + fc, err := ec.fieldContext_Subscription_querySubscribe(ctx, field) + if err != nil { + return nil + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().QuerySubscribe(rctx, fc.Args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Query == nil { + return nil, errors.New("directive Query is not implemented") + } + return ec.directives.Query(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(<-chan *pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/api/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func(ctx context.Context) graphql.Marshaler { + select { + case res, ok := <-resTmp.(<-chan *pb.Data): + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + case <-ctx.Done(): + return nil + } + } +} + +func (ec *executionContext) fieldContext_Subscription_querySubscribe(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Subscription", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stringX": + return ec.fieldContext_Data_stringX(ctx, field) + case "foo": + return ec.fieldContext_Data_foo(ctx, field) + case "double": + return ec.fieldContext_Data_double(ctx, field) + case "string2": + return ec.fieldContext_Data_string2(ctx, field) + case "foo2": + return ec.fieldContext_Data_foo2(ctx, field) + case "double2": + return ec.fieldContext_Data_double2(ctx, field) + case "bars": + return ec.fieldContext_Data_bars(ctx, field) + case "str": + return ec.fieldContext_Data_str(ctx, field) + case "Oneof3": + return ec.fieldContext_Data_Oneof3(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Data", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Subscription_querySubscribe_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_locations(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Locations, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]string) + fc.Result = res + return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type __DirectiveLocation does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_args(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Args, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsRepeatable, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsDeprecated(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DeprecationReason(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_args(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Args, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_isDeprecated(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsDeprecated(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_deprecationReason(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DeprecationReason(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DefaultValue, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_types(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Types(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_queryType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.QueryType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_mutationType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MutationType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SubscriptionType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_directives(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Directives(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.Directive) + fc.Result = res + return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___Directive_name(ctx, field) + case "description": + return ec.fieldContext___Directive_description(ctx, field) + case "locations": + return ec.fieldContext___Directive_locations(ctx, field) + case "args": + return ec.fieldContext___Directive_args(ctx, field) + case "isRepeatable": + return ec.fieldContext___Directive_isRepeatable(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_kind(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Kind(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalN__TypeKind2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type __TypeKind does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_fields(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Field) + fc.Result = res + return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___Field_name(ctx, field) + case "description": + return ec.fieldContext___Field_description(ctx, field) + case "args": + return ec.fieldContext___Field_args(ctx, field) + case "type": + return ec.fieldContext___Field_type(ctx, field) + case "isDeprecated": + return ec.fieldContext___Field_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___Field_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_interfaces(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Interfaces(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_possibleTypes(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PossibleTypes(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_enumValues(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.EnumValue) + fc.Result = res + return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___EnumValue_name(ctx, field) + case "description": + return ec.fieldContext___EnumValue_description(ctx, field) + case "isDeprecated": + return ec.fieldContext___EnumValue_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___EnumValue_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return + } + return fc, nil +} + +func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_inputFields(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.InputFields(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_ofType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.OfType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SpecifiedByURL(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +// endregion **************************** field.gotpl ***************************** + +// region **************************** input.gotpl ***************************** + +func (ec *executionContext) unmarshalInputDataInput(ctx context.Context, obj interface{}) (pb.Data, error) { + var it pb.Data + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"stringX", "foo", "double", "string2", "foo2", "double2", "bars", "str", "param1", "param2"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "stringX": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stringX")) + it.StringX, err = ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + case "foo": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("foo")) + it.Foo, err = ec.unmarshalNFoo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo2(ctx, v) + if err != nil { + return it, err + } + case "double": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("double")) + it.Double, err = ec.unmarshalNFloat2ᚕfloat64ᚄ(ctx, v) + if err != nil { + return it, err + } + case "string2": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("string2")) + it.String2, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + case "foo2": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("foo2")) + it.Foo2, err = ec.unmarshalOFoo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo2(ctx, v) + if err != nil { + return it, err + } + case "double2": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("double2")) + it.Double2, err = ec.unmarshalOFloat2ᚕfloat64ᚄ(ctx, v) + if err != nil { + return it, err + } + case "bars": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bars")) + it.Bar, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + case "str": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("str")) + it.String_, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + case "param1": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param1")) + directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOString2ᚖstring(ctx, v) } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Data_Oneof == nil { + return nil, errors.New("directive Data_Oneof is not implemented") + } + return ec.directives.Data_Oneof(ctx, obj, directive0) + } + + tmp, err := directive1(ctx) + if err != nil { + return it, graphql.ErrorOnPath(ctx, err) + } + if data, ok := tmp.(*string); ok { + if err = ec.resolvers.DataInput().Param1(ctx, &it, data); err != nil { + return it, err + } + } else { + err := fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp) + return it, graphql.ErrorOnPath(ctx, err) + } + case "param2": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param2")) + directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOString2ᚖstring(ctx, v) } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Data_Oneof == nil { + return nil, errors.New("directive Data_Oneof is not implemented") + } + return ec.directives.Data_Oneof(ctx, obj, directive0) + } + + tmp, err := directive1(ctx) + if err != nil { + return it, graphql.ErrorOnPath(ctx, err) + } + if data, ok := tmp.(*string); ok { + if err = ec.resolvers.DataInput().Param2(ctx, &it, data); err != nil { + return it, err + } + } else { + err := fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp) + return it, graphql.ErrorOnPath(ctx, err) + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputFoo2Input(ctx context.Context, obj interface{}) (pb.Foo2, error) { + var it pb.Foo2 + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"param1"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "param1": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param1")) + it.Param1, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +// endregion **************************** input.gotpl ***************************** + +// region ************************** interface.gotpl *************************** + +func (ec *executionContext) _Data_Oneof(ctx context.Context, sel ast.SelectionSet, obj pb.Data_Oneof) graphql.Marshaler { + switch obj := (obj).(type) { + case nil: + return graphql.Null + case pb.Data_Param1: + return ec._Data_Param1(ctx, sel, &obj) + case *pb.Data_Param1: + if obj == nil { + return graphql.Null + } + return ec._Data_Param1(ctx, sel, obj) + case pb.Data_Param2: + return ec._Data_Param2(ctx, sel, &obj) + case *pb.Data_Param2: + if obj == nil { + return graphql.Null + } + return ec._Data_Param2(ctx, sel, obj) + default: + panic(fmt.Errorf("unexpected type %T", obj)) + } +} + +// endregion ************************** interface.gotpl *************************** + +// region **************************** object.gotpl **************************** + +var dataImplementors = []string{"Data"} + +func (ec *executionContext) _Data(ctx context.Context, sel ast.SelectionSet, obj *pb.Data) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, dataImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Data") + case "stringX": + + out.Values[i] = ec._Data_stringX(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "foo": + + out.Values[i] = ec._Data_foo(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "double": + + out.Values[i] = ec._Data_double(ctx, field, obj) + + if out.Values[i] == graphql.Null { + atomic.AddUint32(&invalids, 1) + } + case "string2": + + out.Values[i] = ec._Data_string2(ctx, field, obj) + + case "foo2": + + out.Values[i] = ec._Data_foo2(ctx, field, obj) + + case "double2": + + out.Values[i] = ec._Data_double2(ctx, field, obj) + + case "bars": + + out.Values[i] = ec._Data_bars(ctx, field, obj) + + case "str": + + out.Values[i] = ec._Data_str(ctx, field, obj) + + case "Oneof3": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Data_Oneof3(ctx, field, obj) + return res + } + + out.Concurrently(i, func() graphql.Marshaler { + return innerFunc(ctx) + + }) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var data_Param1Implementors = []string{"Data_Param1", "Data_Oneof"} + +func (ec *executionContext) _Data_Param1(ctx context.Context, sel ast.SelectionSet, obj *pb.Data_Param1) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, data_Param1Implementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Data_Param1") + case "param1": + + out.Values[i] = ec._Data_Param1_param1(ctx, field, obj) + + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var data_Param2Implementors = []string{"Data_Param2", "Data_Oneof"} + +func (ec *executionContext) _Data_Param2(ctx context.Context, sel ast.SelectionSet, obj *pb.Data_Param2) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, data_Param2Implementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Data_Param2") + case "param2": + + out.Values[i] = ec._Data_Param2_param2(ctx, field, obj) + + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var foo2Implementors = []string{"Foo2"} + +func (ec *executionContext) _Foo2(ctx context.Context, sel ast.SelectionSet, obj *pb.Foo2) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, foo2Implementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Foo2") + case "param1": + + out.Values[i] = ec._Foo2_param1(ctx, field, obj) + + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var mutationImplementors = []string{"Mutation"} + +func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ + Object: "Mutation", + }) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ + Object: field.Name, + Field: field, + }) + + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Mutation") + case "serviceMutate1": + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_serviceMutate1(ctx, field) + }) + + case "serviceMutate2": + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_serviceMutate2(ctx, field) + }) + + case "servicePublish": + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_servicePublish(ctx, field) + }) + + case "servicePubSub1": + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_servicePubSub1(ctx, field) + }) + + case "serviceInvalidSubscribe3": + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_serviceInvalidSubscribe3(ctx, field) + }) + + case "servicePubSub2": + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_servicePubSub2(ctx, field) + }) + + case "newName": + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_newName(ctx, field) + }) + + case "name": + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_name(ctx, field) + }) + + case "newName0": + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_newName0(ctx, field) + }) + + case "queryMutate1": + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_queryMutate1(ctx, field) + }) + + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var queryImplementors = []string{"Query"} + +func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ + Object: "Query", + }) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ + Object: field.Name, + Field: field, + }) + + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Query") + case "serviceQuery1": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_serviceQuery1(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) + }) + case "serviceInvalidSubscribe1": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_serviceInvalidSubscribe1(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) + }) + case "queryQuery1": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_queryQuery1(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) + }) + case "queryQuery2": + field := field + + innerFunc := func(ctx context.Context) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_queryQuery2(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) + } + + out.Concurrently(i, func() graphql.Marshaler { + return rrm(innerCtx) + }) + case "__type": + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Query___type(ctx, field) + }) + + case "__schema": + + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Query___schema(ctx, field) + }) + + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var subscriptionImplementors = []string{"Subscription"} + +func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func(ctx context.Context) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, subscriptionImplementors) + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ + Object: "Subscription", + }) + if len(fields) != 1 { + ec.Errorf(ctx, "must subscribe to exactly one stream") + return nil + } + + switch fields[0].Name { + case "serviceSubscribe": + return ec._Subscription_serviceSubscribe(ctx, fields[0]) + case "servicePubSub1": + return ec._Subscription_servicePubSub1(ctx, fields[0]) + case "serviceInvalidSubscribe2": + return ec._Subscription_serviceInvalidSubscribe2(ctx, fields[0]) + case "serviceInvalidSubscribe3": + return ec._Subscription_serviceInvalidSubscribe3(ctx, fields[0]) + case "servicePubSub2": + return ec._Subscription_servicePubSub2(ctx, fields[0]) + case "querySubscribe": + return ec._Subscription_querySubscribe(ctx, fields[0]) + default: + panic("unknown field " + strconv.Quote(fields[0].Name)) + } +} + +var __DirectiveImplementors = []string{"__Directive"} + +func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Directive") + case "name": + + out.Values[i] = ec.___Directive_name(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "description": + + out.Values[i] = ec.___Directive_description(ctx, field, obj) + + case "locations": + + out.Values[i] = ec.___Directive_locations(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "args": + + out.Values[i] = ec.___Directive_args(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "isRepeatable": + + out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __EnumValueImplementors = []string{"__EnumValue"} + +func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__EnumValue") + case "name": + + out.Values[i] = ec.___EnumValue_name(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "description": + + out.Values[i] = ec.___EnumValue_description(ctx, field, obj) + + case "isDeprecated": + + out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "deprecationReason": + + out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) + + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __FieldImplementors = []string{"__Field"} + +func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Field") + case "name": + + out.Values[i] = ec.___Field_name(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "description": + + out.Values[i] = ec.___Field_description(ctx, field, obj) + + case "args": + + out.Values[i] = ec.___Field_args(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "type": + + out.Values[i] = ec.___Field_type(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "isDeprecated": + + out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "deprecationReason": + + out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) + + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __InputValueImplementors = []string{"__InputValue"} + +func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__InputValue") + case "name": + + out.Values[i] = ec.___InputValue_name(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "description": + + out.Values[i] = ec.___InputValue_description(ctx, field, obj) + + case "type": + + out.Values[i] = ec.___InputValue_type(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "defaultValue": + + out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) + + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __SchemaImplementors = []string{"__Schema"} + +func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Schema") + case "description": + + out.Values[i] = ec.___Schema_description(ctx, field, obj) + + case "types": + + out.Values[i] = ec.___Schema_types(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "queryType": + + out.Values[i] = ec.___Schema_queryType(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "mutationType": + + out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) + + case "subscriptionType": + + out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) + + case "directives": + + out.Values[i] = ec.___Schema_directives(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __TypeImplementors = []string{"__Type"} + +func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Type") + case "kind": + + out.Values[i] = ec.___Type_kind(ctx, field, obj) + + if out.Values[i] == graphql.Null { + invalids++ + } + case "name": + + out.Values[i] = ec.___Type_name(ctx, field, obj) + + case "description": + + out.Values[i] = ec.___Type_description(ctx, field, obj) + + case "fields": + + out.Values[i] = ec.___Type_fields(ctx, field, obj) + + case "interfaces": + + out.Values[i] = ec.___Type_interfaces(ctx, field, obj) + + case "possibleTypes": + + out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) + + case "enumValues": + + out.Values[i] = ec.___Type_enumValues(ctx, field, obj) + + case "inputFields": + + out.Values[i] = ec.___Type_inputFields(ctx, field, obj) + + case "ofType": + + out.Values[i] = ec.___Type_ofType(ctx, field, obj) + + case "specifiedByURL": + + out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj) + + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +// endregion **************************** object.gotpl **************************** + +// region ***************************** type.gotpl ***************************** + +func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { + res, err := graphql.UnmarshalBoolean(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { + res := graphql.MarshalBoolean(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v interface{}) (float64, error) { + res, err := graphql.UnmarshalFloatContext(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { + res := graphql.MarshalFloatContext(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return graphql.WrapContextMarshaler(ctx, res) +} + +func (ec *executionContext) unmarshalNFloat2ᚕfloat64ᚄ(ctx context.Context, v interface{}) ([]float64, error) { + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]float64, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNFloat2float64(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalNFloat2ᚕfloat64ᚄ(ctx context.Context, sel ast.SelectionSet, v []float64) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNFloat2float64(ctx, sel, v[i]) + } + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNFoo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo2(ctx context.Context, sel ast.SelectionSet, v *pb.Foo2) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._Foo2(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNFoo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo2(ctx context.Context, v interface{}) (*pb.Foo2, error) { + res, err := ec.unmarshalInputFoo2Input(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { + return ec.___Directive(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]string, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { + return ec.___EnumValue(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { + return ec.___Field(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { + return ec.___InputValue(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { + return ec.___Type(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec.___Type(ctx, sel, v) +} + +func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { + res, err := graphql.UnmarshalBoolean(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { + res := graphql.MarshalBoolean(v) + return res +} + +func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { + if v == nil { + return nil, nil + } + res, err := graphql.UnmarshalBoolean(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { + if v == nil { + return graphql.Null + } + res := graphql.MarshalBoolean(*v) + return res +} + +func (ec *executionContext) marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx context.Context, sel ast.SelectionSet, v *pb.Data) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Data(ctx, sel, v) +} + +func (ec *executionContext) unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData(ctx context.Context, v interface{}) (*pb.Data, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputDataInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOData_Oneof2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐData_Oneof(ctx context.Context, sel ast.SelectionSet, v pb.Data_Oneof) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Data_Oneof(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOFloat2ᚕfloat64ᚄ(ctx context.Context, v interface{}) ([]float64, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]float64, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNFloat2float64(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOFloat2ᚕfloat64ᚄ(ctx context.Context, sel ast.SelectionSet, v []float64) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNFloat2float64(ctx, sel, v[i]) + } + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalOFoo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo2(ctx context.Context, sel ast.SelectionSet, v *pb.Foo2) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Foo2(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOFoo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋapiᚋpbᚐFoo2(ctx context.Context, v interface{}) (*pb.Foo2, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputFoo2Input(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + return res +} + +func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { + if v == nil { + return nil, nil + } + res, err := graphql.UnmarshalString(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { + if v == nil { + return graphql.Null + } + res := graphql.MarshalString(*v) + return res +} + +func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec.___Schema(ctx, sel, v) +} + +func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec.___Type(ctx, sel, v) +} + +// endregion ***************************** type.gotpl ***************************** diff --git a/example/codegen/pb/constructs.gqlgen.pb.go b/example/codegen/api/pb/constructs.gqlgen.pb.go similarity index 98% rename from example/codegen/pb/constructs.gqlgen.pb.go rename to example/codegen/api/pb/constructs.gqlgen.pb.go index 6cc5d10..f13f214 100644 --- a/example/codegen/pb/constructs.gqlgen.pb.go +++ b/example/codegen/api/pb/constructs.gqlgen.pb.go @@ -4,8 +4,8 @@ import ( context "context" fmt "fmt" graphql "github.com/99designs/gqlgen/graphql" - anypb "google.golang.org/protobuf/types/known/anypb" - emptypb "google.golang.org/protobuf/types/known/emptypb" + any1 "github.com/golang/protobuf/ptypes/any" + empty "github.com/golang/protobuf/ptypes/empty" io "io" ) @@ -20,11 +20,11 @@ func (s *ConstructsResolvers) ConstructsRepeated(ctx context.Context, in *Repeat func (s *ConstructsResolvers) ConstructsMaps(ctx context.Context, in *Maps) (*Maps, error) { return s.Service.Maps_(ctx, in) } -func (s *ConstructsResolvers) ConstructsAny(ctx context.Context, in *anypb.Any) (*Any, error) { +func (s *ConstructsResolvers) ConstructsAny(ctx context.Context, in *any1.Any) (*Any, error) { return s.Service.Any_(ctx, in) } func (s *ConstructsResolvers) ConstructsEmpty(ctx context.Context) (*bool, error) { - _, err := s.Service.Empty_(ctx, &emptypb.Empty{}) + _, err := s.Service.Empty_(ctx, &empty.Empty{}) return nil, err } func (s *ConstructsResolvers) ConstructsEmpty2(ctx context.Context) (*bool, error) { diff --git a/example/codegen/pb/constructs.graphql b/example/codegen/api/pb/constructs.graphql similarity index 96% rename from example/codegen/pb/constructs.graphql rename to example/codegen/api/pb/constructs.graphql index 2e3a2e7..b896ecf 100644 --- a/example/codegen/pb/constructs.graphql +++ b/example/codegen/api/pb/constructs.graphql @@ -2,9 +2,7 @@ directive @Constructs on FIELD_DEFINITION directive @Oneof_Oneof1 on INPUT_FIELD_DEFINITION directive @Oneof_Oneof2 on INPUT_FIELD_DEFINITION directive @Oneof_Oneof3 on INPUT_FIELD_DEFINITION -""" -Any is any json type -""" +"""Any is any json type""" scalar Any enum Bar { BAR1 @@ -84,16 +82,7 @@ input Foo_Foo2Input { .setNanos((int) ((millis % 1000) * 1000000)).build(); - Example 5: Compute Timestamp from Java `Instant.now()`. - - Instant now = Instant.now(); - - Timestamp timestamp = - Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - .setNanos(now.getNano()).build(); - - - Example 6: Compute Timestamp from current time in Python. + Example 5: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() @@ -197,16 +186,7 @@ type GoogleProtobuf_Timestamp { .setNanos((int) ((millis % 1000) * 1000000)).build(); - Example 5: Compute Timestamp from Java `Instant.now()`. - - Instant now = Instant.now(); - - Timestamp timestamp = - Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - .setNanos(now.getNano()).build(); - - - Example 6: Compute Timestamp from current time in Python. + Example 5: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() diff --git a/example/codegen/pb/constructs.pb.go b/example/codegen/api/pb/constructs.pb.go similarity index 96% rename from example/codegen/pb/constructs.pb.go rename to example/codegen/api/pb/constructs.pb.go index 5c68ad7..b0f52ff 100644 --- a/example/codegen/pb/constructs.pb.go +++ b/example/codegen/api/pb/constructs.pb.go @@ -1,17 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.19.1 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: pb/constructs.proto package pb import ( + any1 "github.com/golang/protobuf/ptypes/any" + empty "github.com/golang/protobuf/ptypes/empty" + timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - emptypb "google.golang.org/protobuf/types/known/emptypb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" ) @@ -920,7 +920,7 @@ type EmptyRecursive struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Nested1 *emptypb.Empty `protobuf:"bytes,1,opt,name=nested1,proto3" json:"nested1,omitempty"` + Nested1 *empty.Empty `protobuf:"bytes,1,opt,name=nested1,proto3" json:"nested1,omitempty"` Empty *EmptyRecursive `protobuf:"bytes,2,opt,name=empty,proto3" json:"empty,omitempty"` } @@ -956,7 +956,7 @@ func (*EmptyRecursive) Descriptor() ([]byte, []int) { return file_pb_constructs_proto_rawDescGZIP(), []int{8} } -func (x *EmptyRecursive) GetNested1() *emptypb.Empty { +func (x *EmptyRecursive) GetNested1() *empty.Empty { if x != nil { return x.Nested1 } @@ -1069,18 +1069,18 @@ type Ref struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Empty *emptypb.Empty `protobuf:"bytes,10,opt,name=empty,proto3" json:"empty,omitempty"` // must disappear as part of is empty validation - LocalTime2 *Timestamp `protobuf:"bytes,12,opt,name=local_time2,json=localTime2,proto3" json:"local_time2,omitempty"` - External *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=external,proto3" json:"external,omitempty"` - LocalTime *Timestamp `protobuf:"bytes,11,opt,name=local_time,json=localTime,proto3" json:"local_time,omitempty"` - File *Baz `protobuf:"bytes,2,opt,name=file,proto3" json:"file,omitempty"` - FileMsg *Foo `protobuf:"bytes,8,opt,name=file_msg,json=fileMsg,proto3" json:"file_msg,omitempty"` - FileEnum Bar `protobuf:"varint,9,opt,name=file_enum,json=fileEnum,proto3,enum=pb.Bar" json:"file_enum,omitempty"` - Local *Ref_Foo `protobuf:"bytes,3,opt,name=local,proto3" json:"local,omitempty"` - Foreign *Foo_Foo2 `protobuf:"bytes,4,opt,name=foreign,proto3" json:"foreign,omitempty"` - En1 Ref_Foo_En `protobuf:"varint,5,opt,name=en1,proto3,enum=pb.Ref_Foo_En" json:"en1,omitempty"` - En2 Ref_Foo_Bar_En `protobuf:"varint,6,opt,name=en2,proto3,enum=pb.Ref_Foo_Bar_En" json:"en2,omitempty"` - Gz *Ref_Foo_Baz_Gz `protobuf:"bytes,7,opt,name=gz,proto3" json:"gz,omitempty"` + Empty *empty.Empty `protobuf:"bytes,10,opt,name=empty,proto3" json:"empty,omitempty"` // must disappear as part of is empty validation + LocalTime2 *Timestamp `protobuf:"bytes,12,opt,name=local_time2,json=localTime2,proto3" json:"local_time2,omitempty"` + External *timestamp.Timestamp `protobuf:"bytes,1,opt,name=external,proto3" json:"external,omitempty"` + LocalTime *Timestamp `protobuf:"bytes,11,opt,name=local_time,json=localTime,proto3" json:"local_time,omitempty"` + File *Baz `protobuf:"bytes,2,opt,name=file,proto3" json:"file,omitempty"` + FileMsg *Foo `protobuf:"bytes,8,opt,name=file_msg,json=fileMsg,proto3" json:"file_msg,omitempty"` + FileEnum Bar `protobuf:"varint,9,opt,name=file_enum,json=fileEnum,proto3,enum=pb.Bar" json:"file_enum,omitempty"` + Local *Ref_Foo `protobuf:"bytes,3,opt,name=local,proto3" json:"local,omitempty"` + Foreign *Foo_Foo2 `protobuf:"bytes,4,opt,name=foreign,proto3" json:"foreign,omitempty"` + En1 Ref_Foo_En `protobuf:"varint,5,opt,name=en1,proto3,enum=pb.Ref_Foo_En" json:"en1,omitempty"` + En2 Ref_Foo_Bar_En `protobuf:"varint,6,opt,name=en2,proto3,enum=pb.Ref_Foo_Bar_En" json:"en2,omitempty"` + Gz *Ref_Foo_Baz_Gz `protobuf:"bytes,7,opt,name=gz,proto3" json:"gz,omitempty"` } func (x *Ref) Reset() { @@ -1115,7 +1115,7 @@ func (*Ref) Descriptor() ([]byte, []int) { return file_pb_constructs_proto_rawDescGZIP(), []int{11} } -func (x *Ref) GetEmpty() *emptypb.Empty { +func (x *Ref) GetEmpty() *empty.Empty { if x != nil { return x.Empty } @@ -1129,7 +1129,7 @@ func (x *Ref) GetLocalTime2() *Timestamp { return nil } -func (x *Ref) GetExternal() *timestamppb.Timestamp { +func (x *Ref) GetExternal() *timestamp.Timestamp { if x != nil { return x.External } @@ -1206,14 +1206,17 @@ type Oneof struct { Param1 string `protobuf:"bytes,1,opt,name=param1,proto3" json:"param1,omitempty"` // Types that are assignable to Oneof1: + // // *Oneof_Param2 // *Oneof_Param3 Oneof1 isOneof_Oneof1 `protobuf_oneof:"Oneof1"` // Types that are assignable to Oneof2: + // // *Oneof_Param4 // *Oneof_Param5 Oneof2 isOneof_Oneof2 `protobuf_oneof:"Oneof2"` // Types that are assignable to Oneof3: + // // *Oneof_Param6 Oneof3 isOneof_Oneof3 `protobuf_oneof:"Oneof3"` } @@ -1586,12 +1589,12 @@ type Ref_Foo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Bar1 *Ref_Foo_Bar `protobuf:"bytes,1,opt,name=bar1,proto3" json:"bar1,omitempty"` - LocalTime2 *Timestamp `protobuf:"bytes,12,opt,name=local_time2,json=localTime2,proto3" json:"local_time2,omitempty"` - ExternalTime1 *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=external_time1,json=externalTime1,proto3" json:"external_time1,omitempty"` - Bar2 *Ref_Bar `protobuf:"bytes,2,opt,name=bar2,proto3" json:"bar2,omitempty"` - En1 Ref_Foo_En `protobuf:"varint,3,opt,name=en1,proto3,enum=pb.Ref_Foo_En" json:"en1,omitempty"` - En2 Ref_Foo_Bar_En `protobuf:"varint,4,opt,name=en2,proto3,enum=pb.Ref_Foo_Bar_En" json:"en2,omitempty"` + Bar1 *Ref_Foo_Bar `protobuf:"bytes,1,opt,name=bar1,proto3" json:"bar1,omitempty"` + LocalTime2 *Timestamp `protobuf:"bytes,12,opt,name=local_time2,json=localTime2,proto3" json:"local_time2,omitempty"` + ExternalTime1 *timestamp.Timestamp `protobuf:"bytes,13,opt,name=external_time1,json=externalTime1,proto3" json:"external_time1,omitempty"` + Bar2 *Ref_Bar `protobuf:"bytes,2,opt,name=bar2,proto3" json:"bar2,omitempty"` + En1 Ref_Foo_En `protobuf:"varint,3,opt,name=en1,proto3,enum=pb.Ref_Foo_En" json:"en1,omitempty"` + En2 Ref_Foo_Bar_En `protobuf:"varint,4,opt,name=en2,proto3,enum=pb.Ref_Foo_Bar_En" json:"en2,omitempty"` } func (x *Ref_Foo) Reset() { @@ -1640,7 +1643,7 @@ func (x *Ref_Foo) GetLocalTime2() *Timestamp { return nil } -func (x *Ref_Foo) GetExternalTime1() *timestamppb.Timestamp { +func (x *Ref_Foo) GetExternalTime1() *timestamp.Timestamp { if x != nil { return x.ExternalTime1 } @@ -2190,14 +2193,14 @@ var file_pb_constructs_proto_goTypes = []interface{}{ nil, // 34: pb.Maps.StringBarEntry (*EmptyNested_EmptyNested1)(nil), // 35: pb.EmptyNested.EmptyNested1 (*EmptyNested_EmptyNested1_EmptyNested2)(nil), // 36: pb.EmptyNested.EmptyNested1.EmptyNested2 - (*Ref_Bar)(nil), // 37: pb.Ref.Bar - (*Ref_Foo)(nil), // 38: pb.Ref.Foo - (*Ref_Foo_Baz)(nil), // 39: pb.Ref.Foo.Baz - (*Ref_Foo_Bar)(nil), // 40: pb.Ref.Foo.Bar - (*Ref_Foo_Baz_Gz)(nil), // 41: pb.Ref.Foo.Baz.Gz - (*emptypb.Empty)(nil), // 42: google.protobuf.Empty - (*timestamppb.Timestamp)(nil), // 43: google.protobuf.Timestamp - (*anypb.Any)(nil), // 44: google.protobuf.Any + (*Ref_Bar)(nil), // 37: pb.Ref.Bar + (*Ref_Foo)(nil), // 38: pb.Ref.Foo + (*Ref_Foo_Baz)(nil), // 39: pb.Ref.Foo.Baz + (*Ref_Foo_Bar)(nil), // 40: pb.Ref.Foo.Bar + (*Ref_Foo_Baz_Gz)(nil), // 41: pb.Ref.Foo.Baz.Gz + (*empty.Empty)(nil), // 42: google.protobuf.Empty + (*timestamp.Timestamp)(nil), // 43: google.protobuf.Timestamp + (*any1.Any)(nil), // 44: google.protobuf.Any } var file_pb_constructs_proto_depIdxs = []int32{ 16, // 0: pb.Empty3.i:type_name -> pb.Empty3.Int diff --git a/example/codegen/pb/constructs.proto b/example/codegen/api/pb/constructs.proto similarity index 100% rename from example/codegen/pb/constructs.proto rename to example/codegen/api/pb/constructs.proto diff --git a/example/codegen/pb/constructs_grpc.pb.go b/example/codegen/api/pb/constructs_grpc.pb.go similarity index 93% rename from example/codegen/pb/constructs_grpc.pb.go rename to example/codegen/api/pb/constructs_grpc.pb.go index 74ac045..da74d3c 100644 --- a/example/codegen/pb/constructs_grpc.pb.go +++ b/example/codegen/api/pb/constructs_grpc.pb.go @@ -1,14 +1,18 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.21.12 +// source: pb/constructs.proto package pb import ( context "context" + any1 "github.com/golang/protobuf/ptypes/any" + empty "github.com/golang/protobuf/ptypes/empty" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - anypb "google.golang.org/protobuf/types/known/anypb" - emptypb "google.golang.org/protobuf/types/known/emptypb" ) // This is a compile-time assertion to ensure that this generated file @@ -23,8 +27,8 @@ type ConstructsClient interface { Scalars_(ctx context.Context, in *Scalars, opts ...grpc.CallOption) (*Scalars, error) Repeated_(ctx context.Context, in *Repeated, opts ...grpc.CallOption) (*Repeated, error) Maps_(ctx context.Context, in *Maps, opts ...grpc.CallOption) (*Maps, error) - Any_(ctx context.Context, in *anypb.Any, opts ...grpc.CallOption) (*Any, error) - Empty_(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Empty, error) + Any_(ctx context.Context, in *any1.Any, opts ...grpc.CallOption) (*Any, error) + Empty_(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Empty, error) Empty2_(ctx context.Context, in *EmptyRecursive, opts ...grpc.CallOption) (*EmptyNested, error) Empty3_(ctx context.Context, in *Empty3, opts ...grpc.CallOption) (*Empty3, error) Ref_(ctx context.Context, in *Ref, opts ...grpc.CallOption) (*Ref, error) @@ -67,7 +71,7 @@ func (c *constructsClient) Maps_(ctx context.Context, in *Maps, opts ...grpc.Cal return out, nil } -func (c *constructsClient) Any_(ctx context.Context, in *anypb.Any, opts ...grpc.CallOption) (*Any, error) { +func (c *constructsClient) Any_(ctx context.Context, in *any1.Any, opts ...grpc.CallOption) (*Any, error) { out := new(Any) err := c.cc.Invoke(ctx, "/pb.Constructs/Any_", in, out, opts...) if err != nil { @@ -76,7 +80,7 @@ func (c *constructsClient) Any_(ctx context.Context, in *anypb.Any, opts ...grpc return out, nil } -func (c *constructsClient) Empty_(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Empty, error) { +func (c *constructsClient) Empty_(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, "/pb.Constructs/Empty_", in, out, opts...) if err != nil { @@ -137,8 +141,8 @@ type ConstructsServer interface { Scalars_(context.Context, *Scalars) (*Scalars, error) Repeated_(context.Context, *Repeated) (*Repeated, error) Maps_(context.Context, *Maps) (*Maps, error) - Any_(context.Context, *anypb.Any) (*Any, error) - Empty_(context.Context, *emptypb.Empty) (*Empty, error) + Any_(context.Context, *any1.Any) (*Any, error) + Empty_(context.Context, *empty.Empty) (*Empty, error) Empty2_(context.Context, *EmptyRecursive) (*EmptyNested, error) Empty3_(context.Context, *Empty3) (*Empty3, error) Ref_(context.Context, *Ref) (*Ref, error) @@ -160,10 +164,10 @@ func (UnimplementedConstructsServer) Repeated_(context.Context, *Repeated) (*Rep func (UnimplementedConstructsServer) Maps_(context.Context, *Maps) (*Maps, error) { return nil, status.Errorf(codes.Unimplemented, "method Maps_ not implemented") } -func (UnimplementedConstructsServer) Any_(context.Context, *anypb.Any) (*Any, error) { +func (UnimplementedConstructsServer) Any_(context.Context, *any1.Any) (*Any, error) { return nil, status.Errorf(codes.Unimplemented, "method Any_ not implemented") } -func (UnimplementedConstructsServer) Empty_(context.Context, *emptypb.Empty) (*Empty, error) { +func (UnimplementedConstructsServer) Empty_(context.Context, *empty.Empty) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Empty_ not implemented") } func (UnimplementedConstructsServer) Empty2_(context.Context, *EmptyRecursive) (*EmptyNested, error) { @@ -249,7 +253,7 @@ func _Constructs_Maps__Handler(srv interface{}, ctx context.Context, dec func(in } func _Constructs_Any__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(anypb.Any) + in := new(any1.Any) if err := dec(in); err != nil { return nil, err } @@ -261,13 +265,13 @@ func _Constructs_Any__Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/pb.Constructs/Any_", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Any_(ctx, req.(*anypb.Any)) + return srv.(ConstructsServer).Any_(ctx, req.(*any1.Any)) } return interceptor(ctx, in, info, handler) } func _Constructs_Empty__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) + in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } @@ -279,7 +283,7 @@ func _Constructs_Empty__Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: "/pb.Constructs/Empty_", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Empty_(ctx, req.(*emptypb.Empty)) + return srv.(ConstructsServer).Empty_(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } diff --git a/example/codegen/pb/options.gqlgen.pb.go b/example/codegen/api/pb/options.gqlgen.pb.go similarity index 100% rename from example/codegen/pb/options.gqlgen.pb.go rename to example/codegen/api/pb/options.gqlgen.pb.go diff --git a/example/codegen/pb/options.graphql b/example/codegen/api/pb/options.graphql similarity index 100% rename from example/codegen/pb/options.graphql rename to example/codegen/api/pb/options.graphql diff --git a/example/codegen/pb/options.pb.go b/example/codegen/api/pb/options.pb.go similarity index 62% rename from example/codegen/pb/options.pb.go rename to example/codegen/api/pb/options.pb.go index 2b52ad8..042b066 100644 --- a/example/codegen/pb/options.pb.go +++ b/example/codegen/api/pb/options.pb.go @@ -1,13 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.19.1 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: pb/options.proto package pb import ( - _ "github.com/danielvladco/go-proto-gql/pb" + _ "github.com/danielvladco/go-proto-gql/pkg/graphqlpb" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -36,10 +36,12 @@ type Data struct { String_ string `protobuf:"bytes,8,opt,name=string,proto3" json:"string,omitempty"` Ignore string `protobuf:"bytes,9,opt,name=ignore,proto3" json:"ignore,omitempty"` // Types that are assignable to Oneof: + // // *Data_Param1 // *Data_Param2 Oneof isData_Oneof `protobuf_oneof:"Oneof"` // Types that are assignable to Oneof2: + // // *Data_Param3 Oneof2 isData_Oneof2 `protobuf_oneof:"Oneof2"` } @@ -251,85 +253,86 @@ var File_pb_options_proto protoreflect.FileDescriptor var file_pb_options_proto_rawDesc = []byte{ 0x0a, 0x10, 0x70, 0x62, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x10, 0x70, 0x62, 0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, - 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x03, 0x0a, 0x04, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x21, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x78, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x52, 0x07, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x58, 0x12, 0x22, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x32, 0x42, 0x06, 0xb2, 0xe0, 0x1f, - 0x02, 0x08, 0x01, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x1e, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, - 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x01, 0x42, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, - 0x52, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x32, 0x12, 0x1c, 0x0a, 0x04, 0x66, 0x6f, 0x6f, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x32, 0x52, 0x04, 0x66, 0x6f, 0x6f, 0x32, - 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x32, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x01, 0x52, 0x07, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x32, 0x12, 0x1c, 0x0a, 0x03, 0x62, 0x61, - 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xb2, 0xe0, 0x1f, 0x06, 0x2a, 0x04, 0x62, - 0x61, 0x72, 0x73, 0x52, 0x03, 0x62, 0x61, 0x72, 0x12, 0x21, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xb2, 0xe0, 0x1f, 0x05, 0x2a, 0x03, - 0x73, 0x74, 0x72, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x06, 0x69, - 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xb2, 0xe0, 0x1f, - 0x02, 0x20, 0x01, 0x52, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x12, - 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x42, 0x15, 0x0a, 0x05, 0x4f, 0x6e, 0x65, - 0x6f, 0x66, 0x12, 0x0c, 0xb2, 0xe0, 0x1f, 0x08, 0x2a, 0x06, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x33, - 0x42, 0x10, 0x0a, 0x06, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x32, 0x12, 0x06, 0xb2, 0xe0, 0x1f, 0x02, - 0x20, 0x01, 0x22, 0x1e, 0x0a, 0x04, 0x46, 0x6f, 0x6f, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x31, 0x32, 0xeb, 0x03, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d, - 0x0a, 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, - 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x06, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, - 0x08, 0x02, 0x12, 0x1f, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x08, 0x2e, - 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x28, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x23, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, + 0x61, 0x64, 0x63, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x03, 0x0a, 0x04, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x78, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x52, 0x07, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x58, 0x12, 0x22, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x32, 0x42, 0x06, + 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x1e, 0x0a, 0x06, 0x64, + 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x01, 0x42, 0x06, 0xb2, 0xe0, 0x1f, + 0x02, 0x08, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x32, 0x12, 0x1c, 0x0a, 0x04, 0x66, 0x6f, 0x6f, 0x32, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x32, 0x52, 0x04, 0x66, + 0x6f, 0x6f, 0x32, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x32, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x01, 0x52, 0x07, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x32, 0x12, 0x1c, 0x0a, + 0x03, 0x62, 0x61, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xb2, 0xe0, 0x1f, 0x06, + 0x2a, 0x04, 0x62, 0x61, 0x72, 0x73, 0x52, 0x03, 0x62, 0x61, 0x72, 0x12, 0x21, 0x0a, 0x06, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xb2, 0xe0, 0x1f, + 0x05, 0x2a, 0x03, 0x73, 0x74, 0x72, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x1e, + 0x0a, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, + 0xb2, 0xe0, 0x1f, 0x02, 0x20, 0x01, 0x52, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x18, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x32, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x42, 0x15, 0x0a, 0x05, + 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x0c, 0xb2, 0xe0, 0x1f, 0x08, 0x2a, 0x06, 0x4f, 0x6e, 0x65, + 0x6f, 0x66, 0x33, 0x42, 0x10, 0x0a, 0x06, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x32, 0x12, 0x06, 0xb2, + 0xe0, 0x1f, 0x02, 0x20, 0x01, 0x22, 0x1e, 0x0a, 0x04, 0x46, 0x6f, 0x6f, 0x32, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x31, 0x32, 0xeb, 0x03, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x31, 0x12, 0x08, 0x2e, 0x70, + 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x1d, 0x0a, 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x24, 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, 0x79, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, + 0xe0, 0x1f, 0x02, 0x08, 0x02, 0x12, 0x1f, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x21, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x53, 0x75, 0x62, - 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x28, 0x01, 0x30, 0x01, 0x12, 0x31, 0x0a, 0x11, 0x49, 0x6e, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x31, 0x12, 0x08, - 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x02, 0x28, 0x01, 0x12, 0x31, 0x0a, 0x11, + 0x44, 0x61, 0x74, 0x61, 0x28, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, + 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x21, 0x0a, 0x07, 0x50, 0x75, 0x62, + 0x53, 0x75, 0x62, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, + 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x28, 0x01, 0x30, 0x01, 0x12, 0x31, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, - 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x30, 0x01, 0x12, - 0x33, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x33, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, - 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x02, - 0x28, 0x01, 0x30, 0x01, 0x12, 0x29, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x53, 0x75, 0x62, 0x32, 0x12, - 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, - 0x24, 0x0a, 0x06, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, - 0xe0, 0x1f, 0x02, 0x10, 0x01, 0x12, 0x29, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x08, 0x2e, - 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x22, 0x0d, 0xb2, 0xe0, 0x1f, 0x09, 0x1a, 0x07, 0x6e, 0x65, 0x77, 0x4e, 0x61, 0x6d, 0x65, - 0x32, 0x4b, 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, + 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x02, 0x28, 0x01, 0x12, + 0x31, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, + 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, + 0x30, 0x01, 0x12, 0x33, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x33, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, + 0x02, 0x08, 0x02, 0x28, 0x01, 0x30, 0x01, 0x12, 0x29, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x53, 0x75, + 0x62, 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, + 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x00, 0x28, 0x01, + 0x30, 0x01, 0x12, 0x24, 0x0a, 0x06, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x08, 0x2e, 0x70, + 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x10, 0x01, 0x12, 0x29, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x07, 0x4e, 0x65, 0x77, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x1a, 0x08, 0xb2, 0xe0, 0x1f, 0x04, 0x1a, 0x00, 0x20, 0x02, 0x32, 0x97, 0x01, - 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x44, 0x61, 0x74, 0x61, 0x22, 0x0d, 0xb2, 0xe0, 0x1f, 0x09, 0x1a, 0x07, 0x6e, 0x65, 0x77, 0x4e, + 0x61, 0x6d, 0x65, 0x32, 0x4b, 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x04, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, + 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x07, 0x4e, 0x65, 0x77, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, + 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0xb2, 0xe0, 0x1f, 0x04, 0x1a, 0x00, 0x20, 0x02, + 0x32, 0x97, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x06, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, + 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, + 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, 0x79, 0x32, 0x12, - 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x31, 0x12, 0x08, - 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x30, 0x01, 0x1a, 0x08, 0xb2, - 0xe0, 0x1f, 0x04, 0x08, 0x02, 0x20, 0x01, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, - 0x63, 0x6f, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x71, 0x6c, 0x2f, - 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x12, 0x21, 0x0a, + 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x30, 0x01, + 0x1a, 0x08, 0xb2, 0xe0, 0x1f, 0x04, 0x08, 0x02, 0x20, 0x01, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, + 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, + 0x71, 0x6c, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/example/codegen/pb/options.proto b/example/codegen/api/pb/options.proto similarity index 98% rename from example/codegen/pb/options.proto rename to example/codegen/api/pb/options.proto index 0ba3b7b..506d1d0 100644 --- a/example/codegen/pb/options.proto +++ b/example/codegen/api/pb/options.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package pb; option go_package = "github.com/danielvladco/go-proto-gql/example;pb"; -import "pb/danielvladco/protobuf/graphql.proto"; +import "danielvladco/protobuf/graphql.proto"; service Service { rpc Mutate1 (Data) returns (Data); // must be a mutation diff --git a/example/codegen/pb/options_grpc.pb.go b/example/codegen/api/pb/options_grpc.pb.go similarity index 99% rename from example/codegen/pb/options_grpc.pb.go rename to example/codegen/api/pb/options_grpc.pb.go index 15ee0df..cb47749 100644 --- a/example/codegen/pb/options_grpc.pb.go +++ b/example/codegen/api/pb/options_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.21.12 +// source: pb/options.proto package pb diff --git a/example/codegen/api/tools/tools.go b/example/codegen/api/tools/tools.go new file mode 100644 index 0000000..94423c8 --- /dev/null +++ b/example/codegen/api/tools/tools.go @@ -0,0 +1,8 @@ +//go:build tools +// +build tools + +package tools + +import ( + _ "github.com/danielvladco/go-proto-gql/pkg/types" +) diff --git a/example/codegen/go.mod b/example/codegen/go.mod new file mode 100644 index 0000000..d6c3bb0 --- /dev/null +++ b/example/codegen/go.mod @@ -0,0 +1,29 @@ +module github.com/danielvladco/go-proto-gql/example/codegen + +go 1.17 + +replace ( + github.com/danielvladco/go-proto-gql v0.9.0 => ../.. + github.com/danielvladco/go-proto-gql/example/codegen/api v0.0.0 => ./api +) + +require ( + github.com/99designs/gqlgen v0.17.22 + github.com/danielvladco/go-proto-gql/example/codegen/api v0.0.0 +) + +require ( + github.com/agnivade/levenshtein v1.1.1 // indirect + github.com/danielvladco/go-proto-gql v0.9.0 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/gorilla/websocket v1.5.0 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/vektah/gqlparser/v2 v2.5.1 // indirect + golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect + golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect + golang.org/x/text v0.4.0 // indirect + google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect + google.golang.org/grpc v1.51.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect +) diff --git a/example/codegen/go.sum b/example/codegen/go.sum new file mode 100644 index 0000000..4255cbf --- /dev/null +++ b/example/codegen/go.sum @@ -0,0 +1,254 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/99designs/gqlgen v0.17.15/go.mod h1:IXeS/mdPf7JPkmqvbRKjCAV+CLxMKe6vXw6yD9vamB8= +github.com/99designs/gqlgen v0.17.22 h1:TOcrF8t0T3I0za9JD3CB6ehq7dDEMjR9Onikf8Lc/04= +github.com/99designs/gqlgen v0.17.22/go.mod h1:BMhYIhe4bp7OlCo5I2PnowSK/Wimpv/YlxfNkqZGwLo= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= +github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= +github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= +github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/graph-gophers/dataloader v5.0.0+incompatible/go.mod h1:jk4jk0c5ZISbKaMe8WsVopGB5/15GvGHMdMdPtwlRp4= +github.com/graphql-go/graphql v0.7.10-0.20210411022516-8a92e977c10b/go.mod h1:k6yrAYQaSP59DC5UVxbgxESlmVyojThKdORUqGDGmrI= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/jhump/protoreflect v1.7.1/go.mod h1:RZkzh7Hi9J7qT/sPlWnJ/UwZqCJvciFxKDA0UCeltSM= +github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= +github.com/matryer/moq v0.2.7/go.mod h1:kITsx543GOENm48TUAQyJ9+SAvFSr7iGQXPoth/VUBk= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/nautilus/gateway v0.3.3/go.mod h1:ScTIYRI7EsVh4Zow+HCChmox7h1tZPscmCQQ8pziSq8= +github.com/nautilus/graphql v0.0.20/go.mod h1:UYcs/gBtuFrZyX591SuYboby4xFNG9ZkaTYk7BBSRak= +github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/urfave/cli/v2 v2.8.1/go.mod h1:Z41J9TPoffeoqP0Iza0YbAhGvymRdZAd2uPmZ5JxRdY= +github.com/vektah/gqlparser/v2 v2.0.1/go.mod h1:SyUiHgLATUR8BiYURfTirrTcGpcE+4XkV2se04Px1Ms= +github.com/vektah/gqlparser/v2 v2.4.8/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= +github.com/vektah/gqlparser/v2 v2.5.1 h1:ZGu+bquAY23jsxDRcYpWjttRZrUz07LbiY77gUOHcr4= +github.com/vektah/gqlparser/v2 v2.5.1/go.mod h1:mPgqFBu/woKTVYWyNk8cO3kh4S/f4aRFZrvOnp3hmCs= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0/go.mod h1:DNq5QpG7LJqD2AamLZ7zvKE0DEpVl2BSEVjFycAAjRY= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= diff --git a/example/codegen/gqlgen-options.yaml b/example/codegen/gqlgen-options.yaml deleted file mode 100644 index 8642852..0000000 --- a/example/codegen/gqlgen-options.yaml +++ /dev/null @@ -1,12 +0,0 @@ -schema: - - pb/options.graphql - -exec: - filename: gql/options/generated.go - package: options - -model: - filename: gql/constructs/model.go - -autobind: - - "github.com/danielvladco/go-proto-gql/example/codegen/pb" diff --git a/example/codegen/main.go b/example/codegen/main.go index 33044ef..7bef389 100644 --- a/example/codegen/main.go +++ b/example/codegen/main.go @@ -9,9 +9,9 @@ import ( "github.com/99designs/gqlgen/graphql/handler" "github.com/99designs/gqlgen/graphql/playground" - "github.com/danielvladco/go-proto-gql/example/codegen/gql/constructs" - "github.com/danielvladco/go-proto-gql/example/codegen/gql/options" - "github.com/danielvladco/go-proto-gql/example/codegen/pb" + "github.com/danielvladco/go-proto-gql/example/codegen/api/graphql/constructs" + "github.com/danielvladco/go-proto-gql/example/codegen/api/graphql/options" + pb2 "github.com/danielvladco/go-proto-gql/example/codegen/api/pb" ) const defaultPort = "8088" @@ -42,14 +42,14 @@ func main() { type constructsRoot struct{} -func (r constructsRoot) Maps() constructs.MapsResolver { return pb.MapsResolvers{} } -func (r constructsRoot) MapsInput() constructs.MapsInputResolver { return pb.MapsInputResolvers{} } -func (r constructsRoot) OneofInput() constructs.OneofInputResolver { return pb.OneofInputResolvers{} } +func (r constructsRoot) Maps() constructs.MapsResolver { return pb2.MapsResolvers{} } +func (r constructsRoot) MapsInput() constructs.MapsInputResolver { return pb2.MapsInputResolvers{} } +func (r constructsRoot) OneofInput() constructs.OneofInputResolver { return pb2.OneofInputResolvers{} } func (r constructsRoot) Mutation() constructs.MutationResolver { - return &pb.ConstructsResolvers{Service: pb.ConstructsServer(nil)} + return &pb2.ConstructsResolvers{Service: pb2.ConstructsServer(nil)} } func (r constructsRoot) Oneof() constructs.OneofResolver { - return pb.OneofResolvers{} + return pb2.OneofResolvers{} } func (r constructsRoot) Query() constructs.QueryResolver { return dummy{} @@ -70,20 +70,20 @@ func (d dummy) Dummy(ctx context.Context) (*bool, error) { panic("implement me") // submitting an issue or if the issue already exists, show activity on it so I know there is real interest. type optionsRoot struct{} -func (r optionsRoot) Data() options.DataResolver { return pb.DataResolvers{} } -func (r optionsRoot) DataInput() options.DataInputResolver { return pb.DataInputResolvers{} } +func (r optionsRoot) Data() options.DataResolver { return pb2.DataResolvers{} } +func (r optionsRoot) DataInput() options.DataInputResolver { return pb2.DataInputResolvers{} } func (r optionsRoot) Mutation() options.MutationResolver { return &optionsMutationQueryResolver{ - ServiceResolvers: &pb.ServiceResolvers{Service: pb.ServiceServer(nil)}, - QueryResolvers: &pb.QueryResolvers{Service: pb.QueryServer(nil)}, + ServiceResolvers: &pb2.ServiceResolvers{Service: pb2.ServiceServer(nil)}, + QueryResolvers: &pb2.QueryResolvers{Service: pb2.QueryServer(nil)}, } } func (r optionsRoot) Query() options.QueryResolver { return &optionsMutationQueryResolver{ - ServiceResolvers: &pb.ServiceResolvers{Service: pb.ServiceServer(nil)}, - QueryResolvers: &pb.QueryResolvers{Service: pb.QueryServer(nil)}, + ServiceResolvers: &pb2.ServiceResolvers{Service: pb2.ServiceServer(nil)}, + QueryResolvers: &pb2.QueryResolvers{Service: pb2.QueryServer(nil)}, } } @@ -92,44 +92,44 @@ func (r optionsRoot) Subscription() options.SubscriptionResolver { } type optionsMutationQueryResolver struct { - *pb.ServiceResolvers - *pb.TestResolvers - *pb.QueryResolvers + *pb2.ServiceResolvers + *pb2.TestResolvers + *pb2.QueryResolvers } -func (o optionsMutationQueryResolver) ServicePublish(ctx context.Context, in *pb.Data) (*pb.Data, error) { +func (o optionsMutationQueryResolver) ServicePublish(ctx context.Context, in *pb2.Data) (*pb2.Data, error) { panic("implement me") } -func (o optionsMutationQueryResolver) ServicePubSub1(ctx context.Context, in *pb.Data) (*pb.Data, error) { +func (o optionsMutationQueryResolver) ServicePubSub1(ctx context.Context, in *pb2.Data) (*pb2.Data, error) { panic("implement me") } -func (o optionsMutationQueryResolver) ServiceInvalidSubscribe3(ctx context.Context, in *pb.Data) (*pb.Data, error) { +func (o optionsMutationQueryResolver) ServiceInvalidSubscribe3(ctx context.Context, in *pb2.Data) (*pb2.Data, error) { panic("implement me") } -func (o optionsMutationQueryResolver) ServicePubSub2(ctx context.Context, in *pb.Data) (*pb.Data, error) { +func (o optionsMutationQueryResolver) ServicePubSub2(ctx context.Context, in *pb2.Data) (*pb2.Data, error) { panic("implement me") } -func (o optionsMutationQueryResolver) ServiceInvalidSubscribe1(ctx context.Context, in *pb.Data) (*pb.Data, error) { +func (o optionsMutationQueryResolver) ServiceInvalidSubscribe1(ctx context.Context, in *pb2.Data) (*pb2.Data, error) { panic("implement me") } type optionsSubscriptionResolver struct{} -func (o optionsSubscriptionResolver) ServiceSubscribe(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) { +func (o optionsSubscriptionResolver) ServiceSubscribe(ctx context.Context, in *pb2.Data) (<-chan *pb2.Data, error) { panic("implement me") } -func (o optionsSubscriptionResolver) ServicePubSub1(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) { +func (o optionsSubscriptionResolver) ServicePubSub1(ctx context.Context, in *pb2.Data) (<-chan *pb2.Data, error) { panic("implement me") } -func (o optionsSubscriptionResolver) ServiceInvalidSubscribe2(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) { +func (o optionsSubscriptionResolver) ServiceInvalidSubscribe2(ctx context.Context, in *pb2.Data) (<-chan *pb2.Data, error) { panic("implement me") } -func (o optionsSubscriptionResolver) ServiceInvalidSubscribe3(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) { +func (o optionsSubscriptionResolver) ServiceInvalidSubscribe3(ctx context.Context, in *pb2.Data) (<-chan *pb2.Data, error) { panic("implement me") } -func (o optionsSubscriptionResolver) ServicePubSub2(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) { +func (o optionsSubscriptionResolver) ServicePubSub2(ctx context.Context, in *pb2.Data) (<-chan *pb2.Data, error) { panic("implement me") } -func (o optionsSubscriptionResolver) QuerySubscribe(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) { +func (o optionsSubscriptionResolver) QuerySubscribe(ctx context.Context, in *pb2.Data) (<-chan *pb2.Data, error) { panic("implement me") } diff --git a/example/gateway/Makefile b/example/gateway/Makefile index 26462af..5b5cce1 100644 --- a/example/gateway/Makefile +++ b/example/gateway/Makefile @@ -1,20 +1,12 @@ .PHONY: generate start stop -all: generate start - -start: - docker-compose up - -stop: - docker-compose down - generate: gen-pb-options gen-grpc-options gen-pb-constructs gen-grpc-constructs gen-grpc-%: - protoc --go-grpc_out=paths=source_relative:. -I . -I ../../ ./$*server/pb/$*.proto + protoc --go-grpc_out=paths=source_relative:. -I . -I ../../api ./$*server/pb/$*.proto gen-pb-%: - protoc --go_out=paths=source_relative:. -I . -I ../../ ./$*server/pb/$*.proto + protoc --go_out=paths=source_relative:. -I . -I ../../api ./$*server/pb/$*.proto clean: clean-options clean-constructs diff --git a/example/gateway/config.json b/example/gateway/config.json deleted file mode 100644 index 14fd8ee..0000000 --- a/example/gateway/config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "endpoints": [ - "constructsserver:8081", - "optionsserver:8082" - ] -} \ No newline at end of file diff --git a/example/gateway/config.yaml b/example/gateway/config.yaml new file mode 100644 index 0000000..20c6132 --- /dev/null +++ b/example/gateway/config.yaml @@ -0,0 +1,20 @@ +docs: true +cors: +address: ":8080" +grpc: + # import_paths: + # - ./api + services: + - address: "constructsserver:8081" + # authentication: + # tls: + # certificate: "" + # privateKey: "" + reflection: true + - address: "optionsserver:8082" + reflection: true +# authentication: +# insecure: true +# proto_files: +# - ./constructs.proto +# - ./options.proto diff --git a/example/gateway/constructsserver/pb/constructs.pb.go b/example/gateway/constructsserver/pb/constructs.pb.go index baca10e..1f69ff9 100644 --- a/example/gateway/constructsserver/pb/constructs.pb.go +++ b/example/gateway/constructsserver/pb/constructs.pb.go @@ -1,13 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.13.0 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: constructsserver/pb/constructs.proto package constructsserver import ( - any "github.com/golang/protobuf/ptypes/any" + any1 "github.com/golang/protobuf/ptypes/any" empty "github.com/golang/protobuf/ptypes/empty" timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -169,7 +169,7 @@ type AnyInput struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Any *any.Any `protobuf:"bytes,1,opt,name=any,proto3" json:"any,omitempty"` + Any *any1.Any `protobuf:"bytes,1,opt,name=any,proto3" json:"any,omitempty"` } func (x *AnyInput) Reset() { @@ -204,7 +204,7 @@ func (*AnyInput) Descriptor() ([]byte, []int) { return file_constructsserver_pb_constructs_proto_rawDescGZIP(), []int{0} } -func (x *AnyInput) GetAny() *any.Any { +func (x *AnyInput) GetAny() *any1.Any { if x != nil { return x.Any } @@ -882,7 +882,7 @@ type Any struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Any *any.Any `protobuf:"bytes,1,opt,name=any,proto3" json:"any,omitempty"` + Any *any1.Any `protobuf:"bytes,1,opt,name=any,proto3" json:"any,omitempty"` } func (x *Any) Reset() { @@ -917,7 +917,7 @@ func (*Any) Descriptor() ([]byte, []int) { return file_constructsserver_pb_constructs_proto_rawDescGZIP(), []int{7} } -func (x *Any) GetAny() *any.Any { +func (x *Any) GetAny() *any1.Any { if x != nil { return x.Any } @@ -967,7 +967,7 @@ type EmptyRecursive struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // google.protobuf.Empty nested1 = 1; + // google.protobuf.Empty nested1 = 1; Empty *EmptyRecursive `protobuf:"bytes,2,opt,name=empty,proto3" json:"empty,omitempty"` } @@ -1238,14 +1238,17 @@ type Oneof struct { Param1 string `protobuf:"bytes,1,opt,name=param1,proto3" json:"param1,omitempty"` // Types that are assignable to Oneof1: + // // *Oneof_Param2 // *Oneof_Param3 Oneof1 isOneof_Oneof1 `protobuf_oneof:"Oneof1"` // Types that are assignable to Oneof2: + // // *Oneof_Param4 // *Oneof_Param5 Oneof2 isOneof_Oneof2 `protobuf_oneof:"Oneof2"` // Types that are assignable to Oneof3: + // // *Oneof_Param6 Oneof3 isOneof_Oneof3 `protobuf_oneof:"Oneof3"` } @@ -1566,7 +1569,7 @@ func (*EmptyNested_EmptyNested1_EmptyNested2) Descriptor() ([]byte, []int) { return file_constructsserver_pb_constructs_proto_rawDescGZIP(), []int{10, 0, 0} } -// google.protobuf.Empty empty = 10; // must disappear as part of is empty validation +// google.protobuf.Empty empty = 10; // must disappear as part of is empty validation type Ref_Bar struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2285,7 +2288,7 @@ var file_constructsserver_pb_constructs_proto_goTypes = []interface{}{ (*Ref_Foo_Baz)(nil), // 40: constructsserver.Ref.Foo.Baz (*Ref_Foo_Bar)(nil), // 41: constructsserver.Ref.Foo.Bar (*Ref_Foo_Baz_Gz)(nil), // 42: constructsserver.Ref.Foo.Baz.Gz - (*any.Any)(nil), // 43: google.protobuf.Any + (*any1.Any)(nil), // 43: google.protobuf.Any (*timestamp.Timestamp)(nil), // 44: google.protobuf.Timestamp (*empty.Empty)(nil), // 45: google.protobuf.Empty } diff --git a/example/gateway/constructsserver/pb/constructs_grpc.pb.go b/example/gateway/constructsserver/pb/constructs_grpc.pb.go index d461413..56f3931 100644 --- a/example/gateway/constructsserver/pb/constructs_grpc.pb.go +++ b/example/gateway/constructsserver/pb/constructs_grpc.pb.go @@ -1,10 +1,14 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.21.12 +// source: constructsserver/pb/constructs.proto package constructsserver import ( context "context" - any "github.com/golang/protobuf/ptypes/any" + any1 "github.com/golang/protobuf/ptypes/any" empty "github.com/golang/protobuf/ptypes/empty" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -13,6 +17,7 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // ConstructsClient is the client API for Constructs service. @@ -22,7 +27,7 @@ type ConstructsClient interface { Scalars_(ctx context.Context, in *Scalars, opts ...grpc.CallOption) (*Scalars, error) Repeated_(ctx context.Context, in *Repeated, opts ...grpc.CallOption) (*Repeated, error) Maps_(ctx context.Context, in *Maps, opts ...grpc.CallOption) (*Maps, error) - Any_(ctx context.Context, in *any.Any, opts ...grpc.CallOption) (*any.Any, error) + Any_(ctx context.Context, in *any1.Any, opts ...grpc.CallOption) (*any1.Any, error) Anyway_(ctx context.Context, in *Any, opts ...grpc.CallOption) (*AnyInput, error) Empty_(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Empty, error) Empty2_(ctx context.Context, in *EmptyRecursive, opts ...grpc.CallOption) (*EmptyNested, error) @@ -67,8 +72,8 @@ func (c *constructsClient) Maps_(ctx context.Context, in *Maps, opts ...grpc.Cal return out, nil } -func (c *constructsClient) Any_(ctx context.Context, in *any.Any, opts ...grpc.CallOption) (*any.Any, error) { - out := new(any.Any) +func (c *constructsClient) Any_(ctx context.Context, in *any1.Any, opts ...grpc.CallOption) (*any1.Any, error) { + out := new(any1.Any) err := c.cc.Invoke(ctx, "/constructsserver.Constructs/Any_", in, out, opts...) if err != nil { return nil, err @@ -146,7 +151,7 @@ type ConstructsServer interface { Scalars_(context.Context, *Scalars) (*Scalars, error) Repeated_(context.Context, *Repeated) (*Repeated, error) Maps_(context.Context, *Maps) (*Maps, error) - Any_(context.Context, *any.Any) (*any.Any, error) + Any_(context.Context, *any1.Any) (*any1.Any, error) Anyway_(context.Context, *Any) (*AnyInput, error) Empty_(context.Context, *empty.Empty) (*Empty, error) Empty2_(context.Context, *EmptyRecursive) (*EmptyNested, error) @@ -170,7 +175,7 @@ func (UnimplementedConstructsServer) Repeated_(context.Context, *Repeated) (*Rep func (UnimplementedConstructsServer) Maps_(context.Context, *Maps) (*Maps, error) { return nil, status.Errorf(codes.Unimplemented, "method Maps_ not implemented") } -func (UnimplementedConstructsServer) Any_(context.Context, *any.Any) (*any.Any, error) { +func (UnimplementedConstructsServer) Any_(context.Context, *any1.Any) (*any1.Any, error) { return nil, status.Errorf(codes.Unimplemented, "method Any_ not implemented") } func (UnimplementedConstructsServer) Anyway_(context.Context, *Any) (*AnyInput, error) { @@ -204,7 +209,7 @@ type UnsafeConstructsServer interface { } func RegisterConstructsServer(s grpc.ServiceRegistrar, srv ConstructsServer) { - s.RegisterService(&_Constructs_serviceDesc, srv) + s.RegisterService(&Constructs_ServiceDesc, srv) } func _Constructs_Scalars__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -262,7 +267,7 @@ func _Constructs_Maps__Handler(srv interface{}, ctx context.Context, dec func(in } func _Constructs_Any__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(any.Any) + in := new(any1.Any) if err := dec(in); err != nil { return nil, err } @@ -274,7 +279,7 @@ func _Constructs_Any__Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/constructsserver.Constructs/Any_", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Any_(ctx, req.(*any.Any)) + return srv.(ConstructsServer).Any_(ctx, req.(*any1.Any)) } return interceptor(ctx, in, info, handler) } @@ -405,7 +410,10 @@ func _Constructs_CallWithId_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } -var _Constructs_serviceDesc = grpc.ServiceDesc{ +// Constructs_ServiceDesc is the grpc.ServiceDesc for Constructs service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Constructs_ServiceDesc = grpc.ServiceDesc{ ServiceName: "constructsserver.Constructs", HandlerType: (*ConstructsServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/example/gateway/docker-compose.yaml b/example/gateway/docker-compose.yaml index 9f4952f..770308a 100644 --- a/example/gateway/docker-compose.yaml +++ b/example/gateway/docker-compose.yaml @@ -17,6 +17,6 @@ services: gateway: <<: *base_go_service - command: go run ./cmd/gateway/main.go --cfg ./example/gateway/config.json + command: go run ./cmd/gateway/main.go --config ./example/gateway/config.yaml ports: - 8080:8080 diff --git a/example/gateway/optionsserver/main.go b/example/gateway/optionsserver/main.go index 1cdff89..73576fe 100644 --- a/example/gateway/optionsserver/main.go +++ b/example/gateway/optionsserver/main.go @@ -23,7 +23,7 @@ func main() { log.Fatal(s.Serve(l)) } -type service struct{ pb.UnimplementedServiceServer } +type service struct{ pb.UnimplementedServiceServer } func (s service) Mutate1(ctx context.Context, data *pb.Data) (*pb.Data, error) { return data, nil diff --git a/example/gateway/optionsserver/pb/options.pb.go b/example/gateway/optionsserver/pb/options.pb.go index ef27f49..055a438 100644 --- a/example/gateway/optionsserver/pb/options.pb.go +++ b/example/gateway/optionsserver/pb/options.pb.go @@ -1,13 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.13.0 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: optionsserver/pb/options.proto package optionsserver import ( - _ "github.com/danielvladco/go-proto-gql/pb" + _ "github.com/danielvladco/go-proto-gql/pkg/graphqlpb" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -161,102 +161,103 @@ var file_optionsserver_pb_options_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x62, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x1a, - 0x10, 0x70, 0x62, 0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xce, 0x01, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x06, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xb2, 0xe0, 0x1f, 0x02, - 0x08, 0x01, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x2d, 0x0a, 0x03, 0x66, 0x6f, - 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x46, 0x6f, 0x6f, 0x32, 0x42, 0x06, 0xb2, 0xe0, - 0x1f, 0x02, 0x08, 0x01, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x1c, 0x0a, 0x05, 0x66, 0x6c, 0x6f, - 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x02, 0x42, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, - 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x32, 0x12, 0x27, 0x0a, 0x04, 0x66, 0x6f, 0x6f, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x46, 0x6f, 0x6f, 0x32, 0x52, 0x04, 0x66, 0x6f, 0x6f, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6c, - 0x6f, 0x61, 0x74, 0x32, 0x18, 0x06, 0x20, 0x03, 0x28, 0x02, 0x52, 0x06, 0x66, 0x6c, 0x6f, 0x61, - 0x74, 0x32, 0x22, 0x1e, 0x0a, 0x04, 0x46, 0x6f, 0x6f, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x31, 0x32, 0xaf, 0x06, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x33, - 0x0a, 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x31, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, - 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x32, 0x12, 0x13, + 0x23, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xce, 0x01, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, + 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xb2, + 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x2d, 0x0a, + 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x46, 0x6f, 0x6f, 0x32, 0x42, + 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x1c, 0x0a, 0x05, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x02, 0x42, 0x06, 0xb2, 0xe0, 0x1f, + 0x02, 0x08, 0x01, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x32, 0x12, 0x27, 0x0a, 0x04, 0x66, 0x6f, 0x6f, 0x32, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x46, 0x6f, 0x6f, 0x32, 0x52, 0x04, 0x66, 0x6f, 0x6f, 0x32, 0x12, 0x16, 0x0a, + 0x06, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x18, 0x06, 0x20, 0x03, 0x28, 0x02, 0x52, 0x06, 0x66, + 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x22, 0x1e, 0x0a, 0x04, 0x46, 0x6f, 0x6f, 0x32, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x31, 0x32, 0xaf, 0x06, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x33, 0x0a, 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x31, 0x12, 0x13, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, + 0x32, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, 0x06, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x31, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, + 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x02, 0x12, 0x3a, 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x32, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, + 0x02, 0x08, 0x02, 0x12, 0x35, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x31, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, - 0x1f, 0x02, 0x08, 0x02, 0x12, 0x3a, 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, 0x79, 0x32, 0x12, 0x13, + 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x28, 0x01, 0x12, 0x37, 0x0a, 0x09, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x30, 0x01, 0x12, 0x37, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x53, 0x75, 0x62, 0x31, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x02, - 0x12, 0x35, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x13, 0x2e, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x28, 0x01, 0x12, 0x37, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, + 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x28, 0x01, 0x30, 0x01, 0x12, 0x47, 0x0a, 0x11, + 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x31, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, + 0x02, 0x08, 0x02, 0x28, 0x01, 0x12, 0x47, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x32, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, + 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x30, 0x01, 0x12, 0x49, + 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x65, 0x33, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, + 0xe0, 0x1f, 0x02, 0x08, 0x02, 0x28, 0x01, 0x30, 0x01, 0x12, 0x3f, 0x0a, 0x07, 0x50, 0x75, 0x62, + 0x53, 0x75, 0x62, 0x32, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x30, 0x01, - 0x12, 0x37, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x53, 0x75, 0x62, 0x31, 0x12, 0x13, 0x2e, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x28, 0x01, 0x30, 0x01, 0x12, 0x47, 0x0a, 0x11, 0x49, 0x6e, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x31, 0x12, 0x13, + 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, + 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x3a, 0x0a, 0x06, 0x49, 0x67, + 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, + 0xb2, 0xe0, 0x1f, 0x02, 0x10, 0x01, 0x12, 0x3f, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x02, - 0x28, 0x01, 0x12, 0x47, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x32, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x0d, 0xb2, 0xe0, 0x1f, 0x09, 0x1a, 0x07, + 0x6e, 0x65, 0x77, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x75, 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, 0x12, + 0x30, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x30, 0x01, 0x12, 0x49, 0x0a, 0x11, 0x49, - 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x33, - 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, - 0x08, 0x02, 0x28, 0x01, 0x30, 0x01, 0x12, 0x3f, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x53, 0x75, 0x62, - 0x32, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, - 0x02, 0x08, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x3a, 0x0a, 0x06, 0x49, 0x67, 0x6e, 0x6f, 0x72, - 0x65, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, - 0x02, 0x10, 0x01, 0x12, 0x3f, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x13, 0x2e, 0x6f, 0x70, + 0x61, 0x12, 0x33, 0x0a, 0x07, 0x4e, 0x65, 0x77, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x13, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x1a, 0x00, 0x32, 0xed, + 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x32, 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x31, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x06, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x32, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x3b, 0x0a, 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x31, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x0d, 0xb2, 0xe0, 0x1f, 0x09, 0x1a, 0x07, 0x6e, 0x65, 0x77, - 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x75, 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x04, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x33, - 0x0a, 0x07, 0x4e, 0x65, 0x77, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, - 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x1a, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x1a, 0x00, 0x32, 0xed, 0x01, 0x0a, 0x05, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x32, 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, 0x79, 0x31, 0x12, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x12, 0x37, 0x0a, + 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x06, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x32, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, - 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x31, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x22, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x12, 0x37, 0x0a, 0x09, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x13, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x30, 0x01, 0x1a, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x02, 0x42, 0x4d, 0x5a, 0x4b, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, - 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, - 0x67, 0x71, 0x6c, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x62, 0x3b, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x44, 0x61, 0x74, 0x61, 0x30, 0x01, 0x1a, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x02, 0x42, 0x4d, + 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x6e, + 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2d, 0x67, 0x71, 0x6c, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x62, 0x3b, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/example/gateway/optionsserver/pb/options.proto b/example/gateway/optionsserver/pb/options.proto index 499ed4e..969c951 100644 --- a/example/gateway/optionsserver/pb/options.proto +++ b/example/gateway/optionsserver/pb/options.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package optionsserver; option go_package = "github.com/danielvladco/go-proto-gql/gateway/optionsserver/pb;optionsserver"; -import "pb/graphql.proto"; +import "danielvladco/protobuf/graphql.proto"; service Service { rpc Mutate1 (Data) returns (Data); // must be a mutation diff --git a/example/gateway/optionsserver/pb/options_grpc.pb.go b/example/gateway/optionsserver/pb/options_grpc.pb.go index e3d3fbe..a198640 100644 --- a/example/gateway/optionsserver/pb/options_grpc.pb.go +++ b/example/gateway/optionsserver/pb/options_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.21.12 +// source: optionsserver/pb/options.proto package optionsserver @@ -11,6 +15,7 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // ServiceClient is the client API for Service service. @@ -77,7 +82,7 @@ func (c *serviceClient) Query2(ctx context.Context, in *Data, opts ...grpc.CallO } func (c *serviceClient) Publish(ctx context.Context, opts ...grpc.CallOption) (Service_PublishClient, error) { - stream, err := c.cc.NewStream(ctx, &_Service_serviceDesc.Streams[0], "/optionsserver.Service/Publish", opts...) + stream, err := c.cc.NewStream(ctx, &Service_ServiceDesc.Streams[0], "/optionsserver.Service/Publish", opts...) if err != nil { return nil, err } @@ -111,7 +116,7 @@ func (x *servicePublishClient) CloseAndRecv() (*Data, error) { } func (c *serviceClient) Subscribe(ctx context.Context, in *Data, opts ...grpc.CallOption) (Service_SubscribeClient, error) { - stream, err := c.cc.NewStream(ctx, &_Service_serviceDesc.Streams[1], "/optionsserver.Service/Subscribe", opts...) + stream, err := c.cc.NewStream(ctx, &Service_ServiceDesc.Streams[1], "/optionsserver.Service/Subscribe", opts...) if err != nil { return nil, err } @@ -143,7 +148,7 @@ func (x *serviceSubscribeClient) Recv() (*Data, error) { } func (c *serviceClient) PubSub1(ctx context.Context, opts ...grpc.CallOption) (Service_PubSub1Client, error) { - stream, err := c.cc.NewStream(ctx, &_Service_serviceDesc.Streams[2], "/optionsserver.Service/PubSub1", opts...) + stream, err := c.cc.NewStream(ctx, &Service_ServiceDesc.Streams[2], "/optionsserver.Service/PubSub1", opts...) if err != nil { return nil, err } @@ -174,7 +179,7 @@ func (x *servicePubSub1Client) Recv() (*Data, error) { } func (c *serviceClient) InvalidSubscribe1(ctx context.Context, opts ...grpc.CallOption) (Service_InvalidSubscribe1Client, error) { - stream, err := c.cc.NewStream(ctx, &_Service_serviceDesc.Streams[3], "/optionsserver.Service/InvalidSubscribe1", opts...) + stream, err := c.cc.NewStream(ctx, &Service_ServiceDesc.Streams[3], "/optionsserver.Service/InvalidSubscribe1", opts...) if err != nil { return nil, err } @@ -208,7 +213,7 @@ func (x *serviceInvalidSubscribe1Client) CloseAndRecv() (*Data, error) { } func (c *serviceClient) InvalidSubscribe2(ctx context.Context, in *Data, opts ...grpc.CallOption) (Service_InvalidSubscribe2Client, error) { - stream, err := c.cc.NewStream(ctx, &_Service_serviceDesc.Streams[4], "/optionsserver.Service/InvalidSubscribe2", opts...) + stream, err := c.cc.NewStream(ctx, &Service_ServiceDesc.Streams[4], "/optionsserver.Service/InvalidSubscribe2", opts...) if err != nil { return nil, err } @@ -240,7 +245,7 @@ func (x *serviceInvalidSubscribe2Client) Recv() (*Data, error) { } func (c *serviceClient) InvalidSubscribe3(ctx context.Context, opts ...grpc.CallOption) (Service_InvalidSubscribe3Client, error) { - stream, err := c.cc.NewStream(ctx, &_Service_serviceDesc.Streams[5], "/optionsserver.Service/InvalidSubscribe3", opts...) + stream, err := c.cc.NewStream(ctx, &Service_ServiceDesc.Streams[5], "/optionsserver.Service/InvalidSubscribe3", opts...) if err != nil { return nil, err } @@ -271,7 +276,7 @@ func (x *serviceInvalidSubscribe3Client) Recv() (*Data, error) { } func (c *serviceClient) PubSub2(ctx context.Context, opts ...grpc.CallOption) (Service_PubSub2Client, error) { - stream, err := c.cc.NewStream(ctx, &_Service_serviceDesc.Streams[6], "/optionsserver.Service/PubSub2", opts...) + stream, err := c.cc.NewStream(ctx, &Service_ServiceDesc.Streams[6], "/optionsserver.Service/PubSub2", opts...) if err != nil { return nil, err } @@ -392,7 +397,7 @@ type UnsafeServiceServer interface { } func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer) { - s.RegisterService(&_Service_serviceDesc, srv) + s.RegisterService(&Service_ServiceDesc, srv) } func _Service_Mutate1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -675,7 +680,10 @@ func _Service_Name_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -var _Service_serviceDesc = grpc.ServiceDesc{ +// Service_ServiceDesc is the grpc.ServiceDesc for Service service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "optionsserver.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ @@ -810,7 +818,7 @@ type UnsafeTestServer interface { } func RegisterTestServer(s grpc.ServiceRegistrar, srv TestServer) { - s.RegisterService(&_Test_serviceDesc, srv) + s.RegisterService(&Test_ServiceDesc, srv) } func _Test_Name_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -849,7 +857,10 @@ func _Test_NewName_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -var _Test_serviceDesc = grpc.ServiceDesc{ +// Test_ServiceDesc is the grpc.ServiceDesc for Test service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Test_ServiceDesc = grpc.ServiceDesc{ ServiceName: "optionsserver.Test", HandlerType: (*TestServer)(nil), Methods: []grpc.MethodDesc{ @@ -912,7 +923,7 @@ func (c *queryClient) Mutate1(ctx context.Context, in *Data, opts ...grpc.CallOp } func (c *queryClient) Subscribe(ctx context.Context, in *Data, opts ...grpc.CallOption) (Query_SubscribeClient, error) { - stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[0], "/optionsserver.Query/Subscribe", opts...) + stream, err := c.cc.NewStream(ctx, &Query_ServiceDesc.Streams[0], "/optionsserver.Query/Subscribe", opts...) if err != nil { return nil, err } @@ -980,7 +991,7 @@ type UnsafeQueryServer interface { } func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) + s.RegisterService(&Query_ServiceDesc, srv) } func _Query_Query1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -1058,7 +1069,10 @@ func (x *querySubscribeServer) Send(m *Data) error { return x.ServerStream.SendMsg(m) } -var _Query_serviceDesc = grpc.ServiceDesc{ +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ ServiceName: "optionsserver.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/go.mod b/go.mod index 3de2781..10039c8 100644 --- a/go.mod +++ b/go.mod @@ -1,44 +1,41 @@ module github.com/danielvladco/go-proto-gql -go 1.18 +go 1.17 require ( - github.com/99designs/gqlgen v0.14.1-0.20211026151442-6c65e8f15389 - github.com/danielvladco/go-proto-gql/pb v0.6.1 + github.com/99designs/gqlgen v0.17.22 github.com/golang/protobuf v1.5.2 github.com/jhump/protoreflect v1.7.1 - github.com/nautilus/gateway v0.1.4 - github.com/nautilus/graphql v0.0.17-0.20211026193643-b9910208b50a + github.com/nautilus/gateway v0.3.3 + github.com/nautilus/graphql v0.0.20 github.com/pmezard/go-difflib v1.0.0 github.com/rs/cors v1.7.0 - github.com/vektah/gqlparser/v2 v2.2.0 - google.golang.org/grpc v1.43.0 - google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 - google.golang.org/protobuf v1.27.1 - gopkg.in/yaml.v2 v2.2.8 + github.com/vektah/gqlparser/v2 v2.5.1 + google.golang.org/grpc v1.51.0 + google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0 + google.golang.org/protobuf v1.28.1 + gopkg.in/yaml.v2 v2.4.0 ) require ( - github.com/agnivade/levenshtein v1.1.0 // indirect + github.com/agnivade/levenshtein v1.1.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect - github.com/gogo/protobuf v1.2.1 // indirect - github.com/gorilla/websocket v1.4.2 // indirect github.com/graph-gophers/dataloader v5.0.0+incompatible // indirect - github.com/graphql-go/graphql v0.7.10-0.20210411022516-8a92e977c10b // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect - github.com/matryer/moq v0.2.3 // indirect - github.com/mitchellh/mapstructure v1.2.3 // indirect - github.com/opentracing/opentracing-go v1.1.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sergi/go-diff v1.2.0 // indirect - github.com/sirupsen/logrus v1.4.2 // indirect - github.com/urfave/cli/v2 v2.3.0 // indirect - golang.org/x/mod v0.4.2 // indirect - golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1 // indirect - golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect - golang.org/x/text v0.3.6 // indirect - golang.org/x/tools v0.1.5 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + github.com/sirupsen/logrus v1.7.0 // indirect + github.com/urfave/cli/v2 v2.8.1 // indirect + github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect + golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect + golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect + golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect + golang.org/x/text v0.4.0 // indirect + golang.org/x/tools v0.1.12 // indirect google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) + +replace github.com/nautilus/graphql v0.0.20 => github.com/nautilus/graphql v0.0.22 diff --git a/go.sum b/go.sum index 4be631e..7851802 100644 --- a/go.sum +++ b/go.sum @@ -1,51 +1,41 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/99designs/gqlgen v0.11.3/go.mod h1:RgX5GRRdDWNkh4pBrdzNpNPFVsdoUFY2+adM6nb1N+4= -github.com/99designs/gqlgen v0.14.1-0.20211026151442-6c65e8f15389 h1:1SUsJ1YZDF7nbjkkOzha566D2HVXCbi2v04yxyIxVnI= -github.com/99designs/gqlgen v0.14.1-0.20211026151442-6c65e8f15389/go.mod h1:YABKnioMsFD0DPtNSgrQBP+h8p7oJXhZSJhFILkS800= +github.com/99designs/gqlgen v0.17.15/go.mod h1:IXeS/mdPf7JPkmqvbRKjCAV+CLxMKe6vXw6yD9vamB8= +github.com/99designs/gqlgen v0.17.22 h1:TOcrF8t0T3I0za9JD3CB6ehq7dDEMjR9Onikf8Lc/04= +github.com/99designs/gqlgen v0.17.22/go.mod h1:BMhYIhe4bp7OlCo5I2PnowSK/Wimpv/YlxfNkqZGwLo= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= -github.com/agnivade/levenshtein v1.0.3/go.mod h1:4SFRZbbXWLF4MU1T9Qg0pGgH3Pjs+t6ie5efyrwRJXs= -github.com/agnivade/levenshtein v1.1.0 h1:n6qGwyHG61v3ABce1rPVZklEYRT8NFpCMrpZdBUbYGM= -github.com/agnivade/levenshtein v1.1.0/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= +github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= +github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= -github.com/carted/graphql v0.7.6/go.mod h1:aIVByVaa4avHzEnahcnHbP48OrkT/+gTtxBT+dPV2R0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/danielvladco/go-proto-gql/pb v0.6.1 h1:aCcZci9B8bRfAXJST65qNGw2QkoGKDy1m4619JLDOag= -github.com/danielvladco/go-proto-gql/pb v0.6.1/go.mod h1:jX98VVm9haVTbUA3iy8JzyJemHXe/vzEVCkO8ZIX8PY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgryski/trifles v0.0.0-20190318185328-a8d75aae118c/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-chi/chi v3.3.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= -github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -68,125 +58,100 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= -github.com/gorilla/context v0.0.0-20160226214623-1ea25387ff6f/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/dataloader v5.0.0+incompatible h1:R+yjsbrNq1Mo3aPG+Z/EKYrXrXXUNJHOgbRt+U6jOug= github.com/graph-gophers/dataloader v5.0.0+incompatible/go.mod h1:jk4jk0c5ZISbKaMe8WsVopGB5/15GvGHMdMdPtwlRp4= -github.com/graph-gophers/graphql-go v0.0.0-20190108123631-d5b7dc6be53b/go.mod h1:aRnZGurV3LlZ1Y+ygyx1mAV6OUfq+nu6OgpJ6jKgZ3g= -github.com/graphql-go/graphql v0.7.7/go.mod h1:k6yrAYQaSP59DC5UVxbgxESlmVyojThKdORUqGDGmrI= -github.com/graphql-go/graphql v0.7.9/go.mod h1:k6yrAYQaSP59DC5UVxbgxESlmVyojThKdORUqGDGmrI= -github.com/graphql-go/graphql v0.7.10-0.20210411022516-8a92e977c10b h1:pFOI7cDz2wI+MwaoDqqrhFCXkwvpvkWpYQCXvQVAlfs= -github.com/graphql-go/graphql v0.7.10-0.20210411022516-8a92e977c10b/go.mod h1:k6yrAYQaSP59DC5UVxbgxESlmVyojThKdORUqGDGmrI= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jhump/protoreflect v1.7.1 h1:dU3rf2wv1WHvC7mSGYfOaciUAFf5idu6FdC3uZIOlP0= github.com/jhump/protoreflect v1.7.1/go.mod h1:RZkzh7Hi9J7qT/sPlWnJ/UwZqCJvciFxKDA0UCeltSM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= -github.com/matryer/moq v0.0.0-20200106131100-75d0ddfc0007/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= -github.com/matryer/moq v0.0.0-20200125112110-7615cbe60268/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= -github.com/matryer/moq v0.2.3 h1:Q06vEqnBYjjfx5KKgHfYRKE/lvlRu+Nj+xodG4YdHnU= -github.com/matryer/moq v0.2.3/go.mod h1:9RtPYjTnH1bSBIkpvtHkFN7nbWAnO7oRpdJkEIn6UtE= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mitchellh/mapstructure v0.0.0-20180203102830-a4e142e9c047/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= +github.com/matryer/moq v0.2.7/go.mod h1:kITsx543GOENm48TUAQyJ9+SAvFSr7iGQXPoth/VUBk= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.2.3 h1:f/MjBEBDLttYCGfRaKBbKSRVF5aV2O6fnBpzknuE3jU= -github.com/mitchellh/mapstructure v1.2.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/nautilus/gateway v0.1.4 h1:vq2c8TtAECDMJYIlGk71NuiMwbNAjKaKmD7de3gJNLI= -github.com/nautilus/gateway v0.1.4/go.mod h1:RxuX3aApDc+xYY7FpS75o6wOSsJcOstS9tFgCwNKC+U= -github.com/nautilus/graphql v0.0.9/go.mod h1:MQDucBpBRbhwZfeE59tS1DFg7VXS3NvwQpLkgHBmQkg= -github.com/nautilus/graphql v0.0.17-0.20211026193643-b9910208b50a h1:Ac5k25OKTubtoG9+i2UqhWElqj5ZxD4oUr8nECaYwwo= -github.com/nautilus/graphql v0.0.17-0.20211026193643-b9910208b50a/go.mod h1:UYcs/gBtuFrZyX591SuYboby4xFNG9ZkaTYk7BBSRak= +github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/nautilus/gateway v0.3.3 h1:AMmdy9a/GNzgBmuPuAaoVfjAEvb/1zCX+2YjqT0Hl5Y= +github.com/nautilus/gateway v0.3.3/go.mod h1:ScTIYRI7EsVh4Zow+HCChmox7h1tZPscmCQQ8pziSq8= +github.com/nautilus/graphql v0.0.22 h1:mqZ57qW91yvu4/nESi4VSuAGCpR6AIskPxUN/6Bq6KU= +github.com/nautilus/graphql v0.0.22/go.mod h1:eoqPxo/+IdRSfLQKZ2V0al2vYeoMJKO72XpTsUYOmFI= github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/vfsgen v0.0.0-20180121065927-ffb13db8def0/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= -github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M= -github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U= -github.com/vektah/dataloaden v0.3.0/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U= -github.com/vektah/gqlparser v1.1.0/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/urfave/cli/v2 v2.8.1 h1:CGuYNZF9IKZY/rfBe3lJpccSoIY1ytfvmgQT90cNOl4= +github.com/urfave/cli/v2 v2.8.1/go.mod h1:Z41J9TPoffeoqP0Iza0YbAhGvymRdZAd2uPmZ5JxRdY= github.com/vektah/gqlparser/v2 v2.0.1/go.mod h1:SyUiHgLATUR8BiYURfTirrTcGpcE+4XkV2se04Px1Ms= -github.com/vektah/gqlparser/v2 v2.2.0 h1:bAc3slekAAJW6sZTi07aGq0OrfaCjj4jxARAaC7g2EM= -github.com/vektah/gqlparser/v2 v2.2.0/go.mod h1:i3mQIGIrbK2PD1RrCeMTlVbkF2FJ6WkU1KJlJlC+3F4= +github.com/vektah/gqlparser/v2 v2.4.8/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= +github.com/vektah/gqlparser/v2 v2.5.1 h1:ZGu+bquAY23jsxDRcYpWjttRZrUz07LbiY77gUOHcr4= +github.com/vektah/gqlparser/v2 v2.5.1/go.mod h1:mPgqFBu/woKTVYWyNk8cO3kh4S/f4aRFZrvOnp3hmCs= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200320181102-891825fb96df/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -195,11 +160,12 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200320220750-118fecf932d8/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1 h1:4qWs8cYYH6PoEFy4dfhDFgoMGkwAcETd+MmPdCPMzUc= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -207,39 +173,48 @@ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200321134203-328b4cd54aae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190515012406-7d7faa4812bd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200114235610-7ae403b6b589/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200225022059-a0ec867d517c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200815165600-90abf76919f3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.1.5 h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -260,10 +235,10 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.43.0 h1:Eeu7bZtDZ2DpRCsLhUlcrLnvYaMK1Gz86a+hMVvELmM= -google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0 h1:TLkBREm4nIsEcexnCjgQd5GQWaHcqMzwQV0TX9pq8S0= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0/go.mod h1:DNq5QpG7LJqD2AamLZ7zvKE0DEpVl2BSEVjFycAAjRY= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -275,8 +250,10 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= @@ -285,12 +262,12 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -sourcegraph.com/sourcegraph/appdash v0.0.0-20180110180208-2cc67fd64755/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= -sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67/go.mod h1:L5q+DGLGOQFpo1snNEkLOJT2d1YTW66rWNzatr3He1k= diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..e82cc8c --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,71 @@ +site_name: API Adapter +site_dir: .mkdocs +repo_url: https://github.com/danielvladco/go-proto-gql +markdown_extensions: + - abbr + - admonition + - attr_list + - def_list + - footnotes + - md_in_html + - toc: + permalink: true + - pymdownx.arithmatex: + generic: true + - pymdownx.betterem: + smart_enable: all + - pymdownx.caret + - pymdownx.details + - pymdownx.emoji: + emoji_index: !!python/name:materialx.emoji.twemoji + emoji_generator: !!python/name:materialx.emoji.to_svg + - pymdownx.highlight + - pymdownx.inlinehilite + - pymdownx.keys + - pymdownx.mark + - pymdownx.smartsymbols + - pymdownx.superfences + - pymdownx.tabbed: + alternate_style: true + - pymdownx.tasklist: + custom_checkbox: true + - pymdownx.tilde + +theme: + name: material + palette: + - scheme: slate + primary: purple + accent: deep purple + toggle: + icon: material/weather-sunny + name: Switch to light mode + - scheme: default + primary: purple + accent: deep purple + toggle: + icon: material/weather-night + name: Switch to dark mode + + features: + - navigation.instant + - navigation.top + - navigation.expand + # - navigation.sections + + # 404 page + static_templates: + - 404.html + + # Necessary for search to work properly + include_search_page: false + search_index_only: true + + # Default values, taken from mkdocs_theme.yml + language: en + font: + text: Roboto + code: Roboto Mono + favicon: assets/favicon.png + icon: + logo: logo \ No newline at end of file diff --git a/pkg/generator/utils.go b/pkg/generator/utils.go index 9d5dd2b..5405aac 100644 --- a/pkg/generator/utils.go +++ b/pkg/generator/utils.go @@ -146,37 +146,37 @@ func (ds FileDescriptors) AsFileDescriptorProto() (files []*descriptor.FileDescr // // Examples // -// "" => [""] -// "lowercase" => ["lowercase"] -// "Class" => ["Class"] -// "MyClass" => ["My", "Class"] -// "MyC" => ["My", "C"] -// "HTML" => ["HTML"] -// "PDFLoader" => ["PDF", "Loader"] -// "AString" => ["A", "String"] -// "SimpleXMLParser" => ["Simple", "XML", "Parser"] -// "vimRPCPlugin" => ["vim", "RPC", "Plugin"] -// "GL11Version" => ["GL", "11", "Version"] -// "99Bottles" => ["99", "Bottles"] -// "May5" => ["May", "5"] -// "BFG9000" => ["BFG", "9000"] -// "BöseÜberraschung" => ["Böse", "Überraschung"] -// "Two spaces" => ["Two", " ", "spaces"] -// "BadUTF8\xe2\xe2\xa1" => ["BadUTF8\xe2\xe2\xa1"] +// "" => [""] +// "lowercase" => ["lowercase"] +// "Class" => ["Class"] +// "MyClass" => ["My", "Class"] +// "MyC" => ["My", "C"] +// "HTML" => ["HTML"] +// "PDFLoader" => ["PDF", "Loader"] +// "AString" => ["A", "String"] +// "SimpleXMLParser" => ["Simple", "XML", "Parser"] +// "vimRPCPlugin" => ["vim", "RPC", "Plugin"] +// "GL11Version" => ["GL", "11", "Version"] +// "99Bottles" => ["99", "Bottles"] +// "May5" => ["May", "5"] +// "BFG9000" => ["BFG", "9000"] +// "BöseÜberraschung" => ["Böse", "Überraschung"] +// "Two spaces" => ["Two", " ", "spaces"] +// "BadUTF8\xe2\xe2\xa1" => ["BadUTF8\xe2\xe2\xa1"] // // Splitting rules // -// 1) If string is not valid UTF-8, return it without splitting as +// 1. If string is not valid UTF-8, return it without splitting as // single item array. -// 2) Assign all unicode characters into one of 4 sets: lower case +// 2. Assign all unicode characters into one of 4 sets: lower case // letters, upper case letters, numbers, and all other characters. -// 3) Iterate through characters of string, introducing splits +// 3. Iterate through characters of string, introducing splits // between adjacent characters that belong to different sets. -// 4) Iterate through array of split strings, and if a given string +// 4. Iterate through array of split strings, and if a given string // is upper case: -// if subsequent string is lower case: -// move last character of upper case string to beginning of -// lower case string +// if subsequent string is lower case: +// move last character of upper case string to beginning of +// lower case string func SplitCamelCase(src string) (entries []string) { // don't split invalid utf8 if !utf8.ValidString(src) { diff --git a/pkg/graphqlpb/graphql.pb.go b/pkg/graphqlpb/graphql.pb.go index 205bb9d..9a10932 100644 --- a/pkg/graphqlpb/graphql.pb.go +++ b/pkg/graphqlpb/graphql.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.19.1 -// source: pb/graphql.proto +// protoc-gen-go v1.28.1 +// protoc v3.21.12 +// source: graphql.proto -package graphql +package graphqlpb import ( + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" ) @@ -54,11 +54,11 @@ func (x Type) String() string { } func (Type) Descriptor() protoreflect.EnumDescriptor { - return file_pb_graphql_proto_enumTypes[0].Descriptor() + return file_graphql_proto_enumTypes[0].Descriptor() } func (Type) Type() protoreflect.EnumType { - return &file_pb_graphql_proto_enumTypes[0] + return &file_graphql_proto_enumTypes[0] } func (x Type) Number() protoreflect.EnumNumber { @@ -77,7 +77,7 @@ func (x *Type) UnmarshalJSON(b []byte) error { // Deprecated: Use Type.Descriptor instead. func (Type) EnumDescriptor() ([]byte, []int) { - return file_pb_graphql_proto_rawDescGZIP(), []int{0} + return file_graphql_proto_rawDescGZIP(), []int{0} } type Upstream int32 @@ -113,11 +113,11 @@ func (x Upstream) String() string { } func (Upstream) Descriptor() protoreflect.EnumDescriptor { - return file_pb_graphql_proto_enumTypes[1].Descriptor() + return file_graphql_proto_enumTypes[1].Descriptor() } func (Upstream) Type() protoreflect.EnumType { - return &file_pb_graphql_proto_enumTypes[1] + return &file_graphql_proto_enumTypes[1] } func (x Upstream) Number() protoreflect.EnumNumber { @@ -136,7 +136,7 @@ func (x *Upstream) UnmarshalJSON(b []byte) error { // Deprecated: Use Upstream.Descriptor instead. func (Upstream) EnumDescriptor() ([]byte, []int) { - return file_pb_graphql_proto_rawDescGZIP(), []int{1} + return file_graphql_proto_rawDescGZIP(), []int{1} } type Oneof struct { @@ -151,7 +151,7 @@ type Oneof struct { func (x *Oneof) Reset() { *x = Oneof{} if protoimpl.UnsafeEnabled { - mi := &file_pb_graphql_proto_msgTypes[0] + mi := &file_graphql_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -164,7 +164,7 @@ func (x *Oneof) String() string { func (*Oneof) ProtoMessage() {} func (x *Oneof) ProtoReflect() protoreflect.Message { - mi := &file_pb_graphql_proto_msgTypes[0] + mi := &file_graphql_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -177,7 +177,7 @@ func (x *Oneof) ProtoReflect() protoreflect.Message { // Deprecated: Use Oneof.ProtoReflect.Descriptor instead. func (*Oneof) Descriptor() ([]byte, []int) { - return file_pb_graphql_proto_rawDescGZIP(), []int{0} + return file_graphql_proto_rawDescGZIP(), []int{0} } func (x *Oneof) GetIgnore() bool { @@ -209,7 +209,7 @@ type Field struct { func (x *Field) Reset() { *x = Field{} if protoimpl.UnsafeEnabled { - mi := &file_pb_graphql_proto_msgTypes[1] + mi := &file_graphql_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -222,7 +222,7 @@ func (x *Field) String() string { func (*Field) ProtoMessage() {} func (x *Field) ProtoReflect() protoreflect.Message { - mi := &file_pb_graphql_proto_msgTypes[1] + mi := &file_graphql_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -235,7 +235,7 @@ func (x *Field) ProtoReflect() protoreflect.Message { // Deprecated: Use Field.ProtoReflect.Descriptor instead. func (*Field) Descriptor() ([]byte, []int) { - return file_pb_graphql_proto_rawDescGZIP(), []int{1} + return file_graphql_proto_rawDescGZIP(), []int{1} } func (x *Field) GetRequired() bool { @@ -286,7 +286,7 @@ type Rpc struct { func (x *Rpc) Reset() { *x = Rpc{} if protoimpl.UnsafeEnabled { - mi := &file_pb_graphql_proto_msgTypes[2] + mi := &file_graphql_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -299,7 +299,7 @@ func (x *Rpc) String() string { func (*Rpc) ProtoMessage() {} func (x *Rpc) ProtoReflect() protoreflect.Message { - mi := &file_pb_graphql_proto_msgTypes[2] + mi := &file_graphql_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -312,7 +312,7 @@ func (x *Rpc) ProtoReflect() protoreflect.Message { // Deprecated: Use Rpc.ProtoReflect.Descriptor instead. func (*Rpc) Descriptor() ([]byte, []int) { - return file_pb_graphql_proto_rawDescGZIP(), []int{2} + return file_graphql_proto_rawDescGZIP(), []int{2} } func (x *Rpc) GetType() Type { @@ -350,7 +350,7 @@ type Svc struct { func (x *Svc) Reset() { *x = Svc{} if protoimpl.UnsafeEnabled { - mi := &file_pb_graphql_proto_msgTypes[3] + mi := &file_graphql_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -363,7 +363,7 @@ func (x *Svc) String() string { func (*Svc) ProtoMessage() {} func (x *Svc) ProtoReflect() protoreflect.Message { - mi := &file_pb_graphql_proto_msgTypes[3] + mi := &file_graphql_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -376,7 +376,7 @@ func (x *Svc) ProtoReflect() protoreflect.Message { // Deprecated: Use Svc.ProtoReflect.Descriptor instead. func (*Svc) Descriptor() ([]byte, []int) { - return file_pb_graphql_proto_rawDescGZIP(), []int{3} + return file_graphql_proto_rawDescGZIP(), []int{3} } func (x *Svc) GetType() Type { @@ -407,165 +407,165 @@ func (x *Svc) GetUpstream() Upstream { return Upstream_UPSTREAM_UNSPECIFIED } -var file_pb_graphql_proto_extTypes = []protoimpl.ExtensionInfo{ +var file_graphql_proto_extTypes = []protoimpl.ExtensionInfo{ { - ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtendedType: (*descriptor.MethodOptions)(nil), ExtensionType: (*Rpc)(nil), Field: 65030, Name: "danielvladco.protobuf.graphql.rpc", Tag: "bytes,65030,opt,name=rpc", - Filename: "pb/graphql.proto", + Filename: "graphql.proto", }, { - ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtendedType: (*descriptor.ServiceOptions)(nil), ExtensionType: (*Svc)(nil), Field: 65030, Name: "danielvladco.protobuf.graphql.svc", Tag: "bytes,65030,opt,name=svc", - Filename: "pb/graphql.proto", + Filename: "graphql.proto", }, { - ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*Field)(nil), Field: 65030, Name: "danielvladco.protobuf.graphql.field", Tag: "bytes,65030,opt,name=field", - Filename: "pb/graphql.proto", + Filename: "graphql.proto", }, { - ExtendedType: (*descriptorpb.OneofOptions)(nil), + ExtendedType: (*descriptor.OneofOptions)(nil), ExtensionType: (*Oneof)(nil), Field: 65030, Name: "danielvladco.protobuf.graphql.oneof", Tag: "bytes,65030,opt,name=oneof", - Filename: "pb/graphql.proto", + Filename: "graphql.proto", }, } -// Extension fields to descriptorpb.MethodOptions. +// Extension fields to descriptor.MethodOptions. var ( // optional danielvladco.protobuf.graphql.Rpc rpc = 65030; - E_Rpc = &file_pb_graphql_proto_extTypes[0] + E_Rpc = &file_graphql_proto_extTypes[0] ) -// Extension fields to descriptorpb.ServiceOptions. +// Extension fields to descriptor.ServiceOptions. var ( // optional danielvladco.protobuf.graphql.Svc svc = 65030; - E_Svc = &file_pb_graphql_proto_extTypes[1] + E_Svc = &file_graphql_proto_extTypes[1] ) -// Extension fields to descriptorpb.FieldOptions. +// Extension fields to descriptor.FieldOptions. var ( // optional danielvladco.protobuf.graphql.Field field = 65030; - E_Field = &file_pb_graphql_proto_extTypes[2] + E_Field = &file_graphql_proto_extTypes[2] ) -// Extension fields to descriptorpb.OneofOptions. +// Extension fields to descriptor.OneofOptions. var ( // optional danielvladco.protobuf.graphql.Oneof oneof = 65030; - E_Oneof = &file_pb_graphql_proto_extTypes[3] + E_Oneof = &file_graphql_proto_extTypes[3] ) -var File_pb_graphql_proto protoreflect.FileDescriptor - -var file_pb_graphql_proto_rawDesc = []byte{ - 0x0a, 0x10, 0x70, 0x62, 0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x1d, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, - 0x6c, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x05, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x16, 0x0a, 0x06, - 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x67, - 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x7b, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x72, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x69, 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x67, 0x6e, +var File_graphql_proto protoreflect.FileDescriptor + +var file_graphql_proto_rawDesc = []byte{ + 0x0a, 0x0d, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x1d, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x1a, 0x20, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x33, 0x0a, 0x05, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x6a, 0x0a, 0x03, 0x52, 0x70, 0x63, 0x12, 0x37, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x6e, - 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x03, 0x53, 0x76, 0x63, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x7b, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x64, 0x69, 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0x6a, 0x0a, 0x03, 0x52, 0x70, 0x63, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x43, - 0x0a, 0x08, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x27, 0x2e, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, - 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x08, 0x75, 0x70, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x2a, 0x2c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, - 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x55, 0x54, 0x41, - 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, - 0x02, 0x2a, 0x4e, 0x0a, 0x08, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x18, 0x0a, - 0x14, 0x55, 0x50, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x50, 0x53, 0x54, 0x52, - 0x45, 0x41, 0x4d, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, - 0x55, 0x50, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x10, - 0x02, 0x3a, 0x56, 0x0a, 0x03, 0x72, 0x70, 0x63, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x86, 0xfc, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, - 0x2e, 0x52, 0x70, 0x63, 0x52, 0x03, 0x72, 0x70, 0x63, 0x3a, 0x57, 0x0a, 0x03, 0x73, 0x76, 0x63, - 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x86, 0xfc, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x61, 0x6e, 0x69, - 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x53, 0x76, 0x63, 0x52, 0x03, 0x73, - 0x76, 0x63, 0x3a, 0x5b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x86, 0xfc, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, - 0x71, 0x6c, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, - 0x5b, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xaf, + 0x01, 0x0a, 0x03, 0x53, 0x76, 0x63, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, + 0x64, 0x63, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, + 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x75, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, + 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x55, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x08, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x2a, 0x2c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, + 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x55, 0x54, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x02, 0x2a, 0x4e, + 0x0a, 0x08, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x50, + 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x50, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, + 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x50, 0x53, + 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x3a, 0x56, + 0x0a, 0x03, 0x72, 0x70, 0x63, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x86, 0xfc, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x52, 0x70, + 0x63, 0x52, 0x03, 0x72, 0x70, 0x63, 0x3a, 0x57, 0x0a, 0x03, 0x73, 0x76, 0x63, 0x12, 0x1f, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x86, + 0xfc, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, + 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, + 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x53, 0x76, 0x63, 0x52, 0x03, 0x73, 0x76, 0x63, 0x3a, + 0x5b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x86, 0xfc, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, - 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0x31, 0x5a, 0x2f, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x6e, 0x69, 0x65, - 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2d, 0x67, 0x71, 0x6c, 0x2f, 0x70, 0x62, 0x3b, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x5b, 0x0a, 0x05, + 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x86, 0xfc, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, + 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x4f, 0x6e, 0x65, + 0x6f, 0x66, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, + 0x61, 0x64, 0x63, 0x6f, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x71, + 0x6c, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x70, 0x62, } var ( - file_pb_graphql_proto_rawDescOnce sync.Once - file_pb_graphql_proto_rawDescData = file_pb_graphql_proto_rawDesc + file_graphql_proto_rawDescOnce sync.Once + file_graphql_proto_rawDescData = file_graphql_proto_rawDesc ) -func file_pb_graphql_proto_rawDescGZIP() []byte { - file_pb_graphql_proto_rawDescOnce.Do(func() { - file_pb_graphql_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_graphql_proto_rawDescData) +func file_graphql_proto_rawDescGZIP() []byte { + file_graphql_proto_rawDescOnce.Do(func() { + file_graphql_proto_rawDescData = protoimpl.X.CompressGZIP(file_graphql_proto_rawDescData) }) - return file_pb_graphql_proto_rawDescData -} - -var file_pb_graphql_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_pb_graphql_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_pb_graphql_proto_goTypes = []interface{}{ - (Type)(0), // 0: danielvladco.protobuf.graphql.Type - (Upstream)(0), // 1: danielvladco.protobuf.graphql.Upstream - (*Oneof)(nil), // 2: danielvladco.protobuf.graphql.Oneof - (*Field)(nil), // 3: danielvladco.protobuf.graphql.Field - (*Rpc)(nil), // 4: danielvladco.protobuf.graphql.Rpc - (*Svc)(nil), // 5: danielvladco.protobuf.graphql.Svc - (*descriptorpb.MethodOptions)(nil), // 6: google.protobuf.MethodOptions - (*descriptorpb.ServiceOptions)(nil), // 7: google.protobuf.ServiceOptions - (*descriptorpb.FieldOptions)(nil), // 8: google.protobuf.FieldOptions - (*descriptorpb.OneofOptions)(nil), // 9: google.protobuf.OneofOptions -} -var file_pb_graphql_proto_depIdxs = []int32{ + return file_graphql_proto_rawDescData +} + +var file_graphql_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_graphql_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_graphql_proto_goTypes = []interface{}{ + (Type)(0), // 0: danielvladco.protobuf.graphql.Type + (Upstream)(0), // 1: danielvladco.protobuf.graphql.Upstream + (*Oneof)(nil), // 2: danielvladco.protobuf.graphql.Oneof + (*Field)(nil), // 3: danielvladco.protobuf.graphql.Field + (*Rpc)(nil), // 4: danielvladco.protobuf.graphql.Rpc + (*Svc)(nil), // 5: danielvladco.protobuf.graphql.Svc + (*descriptor.MethodOptions)(nil), // 6: google.protobuf.MethodOptions + (*descriptor.ServiceOptions)(nil), // 7: google.protobuf.ServiceOptions + (*descriptor.FieldOptions)(nil), // 8: google.protobuf.FieldOptions + (*descriptor.OneofOptions)(nil), // 9: google.protobuf.OneofOptions +} +var file_graphql_proto_depIdxs = []int32{ 0, // 0: danielvladco.protobuf.graphql.Rpc.type:type_name -> danielvladco.protobuf.graphql.Type 0, // 1: danielvladco.protobuf.graphql.Svc.type:type_name -> danielvladco.protobuf.graphql.Type 1, // 2: danielvladco.protobuf.graphql.Svc.upstream:type_name -> danielvladco.protobuf.graphql.Upstream @@ -584,13 +584,13 @@ var file_pb_graphql_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_pb_graphql_proto_init() } -func file_pb_graphql_proto_init() { - if File_pb_graphql_proto != nil { +func init() { file_graphql_proto_init() } +func file_graphql_proto_init() { + if File_graphql_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_pb_graphql_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_graphql_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Oneof); i { case 0: return &v.state @@ -602,7 +602,7 @@ func file_pb_graphql_proto_init() { return nil } } - file_pb_graphql_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_graphql_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Field); i { case 0: return &v.state @@ -614,7 +614,7 @@ func file_pb_graphql_proto_init() { return nil } } - file_pb_graphql_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_graphql_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Rpc); i { case 0: return &v.state @@ -626,7 +626,7 @@ func file_pb_graphql_proto_init() { return nil } } - file_pb_graphql_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_graphql_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Svc); i { case 0: return &v.state @@ -643,20 +643,20 @@ func file_pb_graphql_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pb_graphql_proto_rawDesc, + RawDescriptor: file_graphql_proto_rawDesc, NumEnums: 2, NumMessages: 4, NumExtensions: 4, NumServices: 0, }, - GoTypes: file_pb_graphql_proto_goTypes, - DependencyIndexes: file_pb_graphql_proto_depIdxs, - EnumInfos: file_pb_graphql_proto_enumTypes, - MessageInfos: file_pb_graphql_proto_msgTypes, - ExtensionInfos: file_pb_graphql_proto_extTypes, + GoTypes: file_graphql_proto_goTypes, + DependencyIndexes: file_graphql_proto_depIdxs, + EnumInfos: file_graphql_proto_enumTypes, + MessageInfos: file_graphql_proto_msgTypes, + ExtensionInfos: file_graphql_proto_extTypes, }.Build() - File_pb_graphql_proto = out.File - file_pb_graphql_proto_rawDesc = nil - file_pb_graphql_proto_goTypes = nil - file_pb_graphql_proto_depIdxs = nil + File_graphql_proto = out.File + file_graphql_proto_rawDesc = nil + file_graphql_proto_goTypes = nil + file_graphql_proto_depIdxs = nil } diff --git a/pkg/protoparser/parser.go b/pkg/protoparser/parser.go index c94a90a..bbf983c 100644 --- a/pkg/protoparser/parser.go +++ b/pkg/protoparser/parser.go @@ -9,7 +9,7 @@ type Option func(p *protoparse.Parser) func WithSourceCodeInfo(v bool) Option { return func(p *protoparse.Parser) { - p.IncludeSourceCodeInfo = v + p.IncludeSourceCodeInfo = v } } diff --git a/pkg/server/config.go b/pkg/server/config.go index 4050797..4fa3158 100644 --- a/pkg/server/config.go +++ b/pkg/server/config.go @@ -26,3 +26,13 @@ type Config struct { Address string `json:"address" yaml:"address"` Tls *Tls `json:"tls" yaml:"tls"` } + +func DefaultConfig() *Config { + return &Config{ + Address: ":8080", + Cors: &cors.Options{}, + Grpc: &Grpc{}, + Playground: &[]bool{true}[0], + Tls: nil, + } +} diff --git a/pkg/server/gateway.go b/pkg/server/gateway.go index ddb49f1..03ae226 100644 --- a/pkg/server/gateway.go +++ b/pkg/server/gateway.go @@ -11,11 +11,6 @@ import ( ) func Server(cfg *Config) (http.Handler, error) { - if cfg.Playground == nil { - plg := true - cfg.Playground = &plg - } - caller, descs, err := NewReflectCaller(cfg.Grpc) if err != nil { return nil, err diff --git a/protoc-gen-gogql/main.go b/protoc-gen-gogql/main.go index 31c403a..1fbc92b 100644 --- a/protoc-gen-gogql/main.go +++ b/protoc-gen-gogql/main.go @@ -242,10 +242,10 @@ func (o `, msg.GoIdent.GoName, `Resolvers) `, goResolveName(oneof.GoName, oneofO } } -//IsEmpty same isEmpty but for mortals +// IsEmpty same isEmpty but for mortals func IsEmpty(o *protogen.Message) bool { return isEmpty(o, generator.NewCallstack()) } -//isEmpty make sure objects are fulled with all objects +// isEmpty make sure objects are fulled with all objects func isEmpty(o *protogen.Message, callstack generator.Callstack) bool { callstack.Push(o) defer callstack.Pop(o) diff --git a/scripts/install-protoc.sh b/scripts/install-protoc.sh index 6f15e1b..b87a135 100755 --- a/scripts/install-protoc.sh +++ b/scripts/install-protoc.sh @@ -1,12 +1,34 @@ #!/usr/bin/env bash -PROTOC_VERSION=${PROTOC_VERSION:-"3.19.1"} -OS="linux" -if [[ $(uname) == "Darwin" ]]; then - OS="osx" -fi +PROTOC_VERSION=${PROTOC_VERSION:-"21.12"} -ARCHIVE_NAME="protoc-$PROTOC_VERSION-$OS-$(uname -m)" +ARCH=$(uname -m) +case $ARCH in + "arm64") + ARCH="aarch_64" + ;; + "arm32") + ARCH="aarch_32" + ;; + "aarch64") + ARCH="aarch_64" + ;; + "aarch32") + ARCH="aarch_32" + ;; +esac + +OS=$(uname) +case $OS in + "Darwin") + OS="osx" + ;; + "Linux") + OS="linux" + ;; +esac + +ARCHIVE_NAME="protoc-$PROTOC_VERSION-$OS-$ARCH" curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOC_VERSION/$ARCHIVE_NAME.zip" cleanup () { @@ -14,9 +36,10 @@ cleanup () { rm -rf $ARCHIVE_NAME } -trap cleanup EXIT +trap cleanup 0 1 2 3 9 unzip -o $ARCHIVE_NAME -d $ARCHIVE_NAME GOPATH="$(go env GOPATH)" +rm -f $GOPATH/bin/protoc mv $ARCHIVE_NAME/bin/protoc $GOPATH/bin rm -rf $GOPATH/include mkdir -p $GOPATH/include diff --git a/test/gateway_test.go b/test/gateway_test.go index 5df76f7..86ab698 100644 --- a/test/gateway_test.go +++ b/test/gateway_test.go @@ -93,8 +93,6 @@ func Test_Gateway(t *testing.T) { compareGraphql(t, schema.Schema, expectedFormattedSchema) }) - //log.Printf("http://127.0.0.1:%d/playground'\n", gatewayServer.(*net.TCPAddr).Port) - //<-make(chan struct{}) tests := []struct { name string query string diff --git a/test/generator_test.go b/test/generator_test.go index d057143..6c70e68 100644 --- a/test/generator_test.go +++ b/test/generator_test.go @@ -78,6 +78,8 @@ func relativeFile(filename string) string { } func compareGraphql(t *testing.T, got, expect *ast.Schema) { + t.Helper() + expectedGraphql := &bytes.Buffer{} actualGraphql := &bytes.Buffer{} formatter.NewFormatter(actualGraphql).FormatSchema(got) diff --git a/test/testdata/gateway-expect.graphql b/test/testdata/gateway-expect.graphql index 8f24aa2..004502d 100644 --- a/test/testdata/gateway-expect.graphql +++ b/test/testdata/gateway-expect.graphql @@ -5,7 +5,13 @@ directive @Oneof_Oneof3 on INPUT_FIELD_DEFINITION directive @Query on FIELD_DEFINITION directive @Service on FIELD_DEFINITION directive @Test on FIELD_DEFINITION -directive @goField on INPUT_FIELD_DEFINITION | FIELD_DEFINITION +directive @goField(forceResolver: Boolean, name: String) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION + +""" +The @specifiedBy built-in directive is used within the type system definition language to provide a scalar specification URL for specifying the behavior of custom scalar types. +""" +directive @specifiedBy(url: String!) on SCALAR + """ Any is any json type """ @@ -284,9 +290,11 @@ input OneofInput { param5: String param6: String } -union Oneof_Oneof1 -union Oneof_Oneof2 -union Oneof_Oneof3 + +union Oneof_Oneof1 = Oneof_Param2 | Oneof_Param3 +union Oneof_Oneof2 = Oneof_Param4 | Oneof_Param5 +union Oneof_Oneof3 = Oneof_Param6 + type Oneof_Param2 { param2: String }