GraphQLAPIWrapper#

class langchain_community.utilities.graphql.GraphQLAPIWrapper[source]#

Bases: BaseModel

Wrapper around GraphQL API.

To use, you should have the gql python package installed. This wrapper will use the GraphQL API to conduct queries.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

param custom_headers: Dict[str, str] | None = None#
param fetch_schema_from_transport: bool | None = None#
param graphql_endpoint: str [Required]#
run(query: str) str[source]#

Run a GraphQL query and get the results.

Parameters:

query (str) –

Return type:

str