Skip to content

Exception creating synchronous session from Client: Unknown argument includeDeprecated #564

@FrankC01

Description

@FrankC01

Common problems
I checked the log...
Early in the log their is a:

2025-09-02 05:10:45,315 dsl DEBUG Creating <DSLField __Directive::args>
2025-09-02 05:10:45,315 dsl DEBUG Added arguments {'includeDeprecated': True} in field <DSLField __Directive::args>)

And then later on:

2025-09-02 05:10:45,483 httpx DEBUG <<< {"data":null,"errors":[{"message":"Unknown argument \"includeDeprecated\" on field \"args\" of type \"__Field\".","locations":[{"line":33,"column":10}]},{"message":"Unknown argument \"includeDeprecated\" on field \"inputFields\" of type \"__Type\".","locations":[{"line":42,"column":15}]},{"message":"Unknown field \"isDeprecated\" on type \"__InputValue\".","locations":[{"line":66,"column":3}]},{"message":"Unknown field \"deprecationReason\" on type \"__InputValue\".","locations":[{"line":67,"column":3}]},{"message":"Unknown argument \"includeDeprecated\" on field \"args\" of type \"__Directive\".","locations":[{"line":19,"column":12}]}]}

Describe the bug
Just upgraded to gql 4.0.0 from 3.5.3

To Reproduce
Construct Client:

        _init_client: Client = Client(
            transport=HTTPXTransport(
                url=gql_url,
                verify=True,
                http2=True,
                timeout=self.timeout,
                proxy=proxies,
            ),
            fetch_schema_from_transport=True,
        )

Try to get a session:

with _init_client as session:

And then the exception occurs

Expected behavior

A session is returned

System info (please complete the following information):

  • OS: macosx - 15.6.1 (24G90)
  • Python version: - 3.10.6
  • gql version: 4.0.0
  • graphql-core version: 3.2.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions