Skip to content

Cannot get inline fragment fields from selectionSet #973

Closed

Description

@domarmstrong

Hi. I am not seeing a way to retrieve the fields of an inline fragment from the DataFetchingEnvironment.
The following query yields id,type,status but not other. GetFragmentsByName returns nothing. So not sure how i am supposed to access this field?

{
    things {
      id
      type
      status
      ...on ChildType {
        other
      }
    }

Activity

  1. bbakerman commented on Mar 13, 2018

    @bbakerman
    Member

    Care to leave a more complete code example, perhaps a unit test of sorts to explain the code more

  2. domarmstrong commented on Mar 14, 2018

    @domarmstrong
    Author

    Yes I'll put something together, havn't had time today

  3. domarmstrong commented on Mar 15, 2018

    @domarmstrong
    Author

    I'm resolving the paths now using DataFetchingEnvironment.getFields() to get the Fields/SelectionSets directly. So closing as no issue for me now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions