这是indexloc提供的服务,不要输入任何密码
Skip to content

Subscribing to __typename of a namespace errors #8174

@quody

Description

@quody

Version Information

Server Version: 2.1.0 and 2.2.0

Environment

OSS

What is the expected behaviour?

Receiving the same __typename for namespaces both from subscriptions and queries.

Keywords

subscription namespace introspection __typename

What is the current behaviour?

When querying namespace __typename everything works fine. For example, in my database
query { v2 { __typename } }
Yields the response
{ "data": { "v2": { "__typename": "v2v2_query" } } }

However, if I use a subscription I receive the following error
subscription { v2 { __typename } }

{ "extensions": { "path": "$", "code": "not-supported" }, "message": "Introspection not supported over subscriptions" }

This issue also essentially prevents using Apollo Client subscriptions on namespaces, because Apollo uses the __typename for caching and fragments.

How to reproduce the issue?

  1. Create a namespace in Hasura
  2. In a subscription try to query the __typename field of a namespace

Screenshots or Screencast

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    k/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions