Skip to content

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

Closed

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

Activity

  1. leszekhanusz commented on Sep 2, 2025

    @leszekhanusz
    Collaborator

    From the breaking changes in 4.0, there is:

    introspection now requests deprecated input fields by default (#553)

    Some backends do not support that. You could either remove fetch_schema_from_transport=True if you don't want the schema, or you could go back to the previous behavior with

    Client(
        transport=transport,
        fetch_schema_from_transport=True,
        introspection_args={
            "input_value_deprecation": False,
        },
    )
  2. added
    type: question or discussion
    on Sep 2, 2025
  3. FrankC01 commented on Sep 2, 2025

    @FrankC01
    Author

    @leszekhanusz
    Thank you, I must have missed or didn't understand the correlation in the release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: question or discussion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions