graphql-python/gql

Querying an Interface with the DSL

jscheel opened this issue · 2 comments

This may be possible already, but I can't work out how to query an interface with the DSL. For example, how would I implement this query?

query Conversation($id: ID!) {
    node(id: $id) {
        ... on Conversation {
            __typename
            id
            subject
        }
    }
}

Well, it depends on your schema, we need to know the name of the types.

Did you check the documentation?

What did you try?

@leszekhanusz Lol, you know what? I had 4 different tabs of the the documentation open, and somehow still missed the Inline Fragment section. That's what I get for starting something new on a Friday afternoon 🤦