From 607cac1d259145db374371621096f7ca32340a8c Mon Sep 17 00:00:00 2001 From: Keith Mattix II Date: Mon, 6 Jan 2020 13:46:55 -0600 Subject: [PATCH] Update README --- README.md | 2 +- internal/exec/exec.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index eaf37b10..9d65f764 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ When using `UseFieldResolvers` schema option, a struct field will be used *only* The method has up to two arguments: -- Optional `context.Context` argument. +- Optional `context.Context` argument. If the graphql query had nested subfields, then use the `SelctedFieldsFromContext(ctx context.Context)` getter method - Mandatory `*struct { ... }` argument if the corresponding GraphQL field has arguments. The names of the struct fields have to be [exported](https://golang.org/ref/spec#Exported_identifiers) and have to match the names of the GraphQL arguments in a non-case-sensitive way. The method has up to two results: diff --git a/internal/exec/exec.go b/internal/exec/exec.go index b64058f6..abbd1249 100644 --- a/internal/exec/exec.go +++ b/internal/exec/exec.go @@ -176,7 +176,6 @@ func selectionToSelectedFields(internalSelection []selected.Selection) []*select Name: field.Name, SelectedFields: nestedSelections, }) - fieldSelection = append(fieldSelection, nestedSelections...) } } return fieldSelection