community[patch]: pass bool value for fetch_schema_from_transport in GraphQLAPIWrapper (#17552)

- **Description:** Allow a bool value to be passed to
fetch_schema_from_transport since not all GraphQL instances support this
feature, such as TigerGraph.
- **Threads:** @zacharytoliver

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
Zachary Toliver 2024-02-15 08:54:04 -06:00 committed by GitHub
parent 789cd5198d
commit 6746adf363
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,7 +37,10 @@ class GraphQLAPIWrapper(BaseModel):
url=values["graphql_endpoint"],
headers=headers,
)
client = Client(transport=transport, fetch_schema_from_transport=True)
fetch_schema_from_transport = values.get("fetch_schema_from_transport", True)
client = Client(
transport=transport, fetch_schema_from_transport=fetch_schema_from_transport
)
values["gql_client"] = client
values["gql_function"] = gql
return values