Dgraph: GraphQL Fragment spread not working in Dgraph 2.0

Created on 21 Feb 2020  路  1Comment  路  Source: dgraph-io/dgraph

What version of Dgraph are you using?

Probably the latest as exposed by
https://dgraph.io/graphql

Have you tried reproducing the issue with the latest release?

NA

What is the hardware spec (RAM, OS)?

Not sure

Steps to reproduce the issue (command/config used to run Dgraph).

  1. Goto https://dgraph.io/graphql
  2. Execute query to check if results are returned
    image

  3. Modify the query to use this GraphQL query in GraphiQL

query {
    queryLocation(
        filter: { name: {eq: "Bangalore"} }
    ) {
        ...locationFragment
    }
}

fragment locationFragment on Location {
  name
    featured_in_films (
            order: { desc: initial_release_date },
            first: 3
        ) {
            name
            initial_release_date
            featured_locations {
                name
            }
        }
}
  1. No results returned
    image

Expected behaviour and actual result.

Expected Behaviour should be same as the results of the query without the named fragment

aregraphql kinbug statuaccepted

Most helpful comment

Thanks for reporting.

Fragments currently work in schema introspection queries, but not in regular queries.

It's not great to have it like this, I'll prioritise this to get added.

>All comments

Thanks for reporting.

Fragments currently work in schema introspection queries, but not in regular queries.

It's not great to have it like this, I'll prioritise this to get added.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xhochipe picture xhochipe  路  3Comments

armaneous picture armaneous  路  3Comments

MichelDiz picture MichelDiz  路  3Comments

ShawnMilo picture ShawnMilo  路  4Comments

andrewsmedina picture andrewsmedina  路  4Comments