Skip to content

The agent engineering platform.

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

Zachary Toliver6746adf36352
diff --git a/libs/community/langchain_community/utilities/graphql.py b/libs/community/langchain_community/utilities/graphql.py
index 87be94d09c..a576419e5b 100644
--- a/libs/community/langchain_community/utilities/graphql.py
+++ b/libs/community/langchain_community/utilities/graphql.py
@@ -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