Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Carry non-fragment fields into the result for a fragment #299

Merged
merged 1 commit into from
Sep 3, 2019

Conversation

kraney
Copy link

@kraney kraney commented Aug 30, 2019

A query on an interface that specifies common fields outside the fragment and other fields inside the fragment will fail with an error on the common fields. E.g.

query Area {
  Area {
    name
    __typename
    includes{
      name
      ...on Partition {
        resident
      }
    }
  }
}

This results in an "unable to resolve field Partition.name" error, while this works.

query Area {
  Area {
    name
    __typename
    includes{
      ...on Partition {
        name
        resident
      }
    }
  }
}

This fix keeps the common-level fields when processing a fragment

@johnymontana
Copy link
Contributor

Great, thanks @kraney!

@johnymontana johnymontana merged commit 47a5d53 into neo4j-graphql:master Sep 3, 2019
@kraney kraney deleted the fragment_fix branch September 3, 2019 18:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants