Skip to content

Question: support for @include(if: $foo) directive #302

@laynor

Description

@laynor

Does ferry support queries like the one below?

query Foo($shouldFetchBar: Boolean = true) {
  moo {
    baz {
      bar @include(if: $shouldFetchPaymentSound) {
         foobar
      }
    }
  }
}

My query works correctly with the Apollo client app, while ferry returns a null response.data field.
I wonder if I'm doing something wrong - I noticed ferry silently returns a null data field even in the case of union fields if the query is not specifying the __typename field, e.g.

query Foobar { 
   foo { 
      ... on Bar { 
              moo
      }
      ... on Baz { 
              boo 
     }
}

won't work (returning a null data field), while

query Foobar { 
  foo { 
  ... on Bar { 
    __typename
    moo
  }
  ... on Baz { 
    __typename
    boo 
  }
}

will work correctly.

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