Skip to main content

GraphQL Loader

pip install llama-index-readers-graphql

This loader loads documents via GraphQL queries from a GraphQL endpoint. The user specifies a GraphQL endpoint URL with optional credentials to initialize the reader. By declaring the GraphQL query and optional variables (parameters) the loader can fetch the nested result docs.

Usage

Here's an example usage of the GraphQLReader. You can test out queries directly on the site

import os

from llama_index.readers.graphql import GraphQLReader

uri = "https://countries.trevorblades.com/"
headers = {}
query = """
    query getContinents {
        continents {
            code
            name
        }
    }
"""
reader = GraphQLReader(uri, headers)
documents = reader.query(query, variables={})

This loader is designed to be used as a way to load data into LlamaIndex and/or subsequently used as a Tool in a LangChain Agent.

It uses the gql GraphQL library for the GraphQL queries.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_readers_graphql-0.6.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_readers_graphql-0.6.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_readers_graphql-0.6.0.tar.gz.

File metadata

  • Download URL: llama_index_readers_graphql-0.6.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_readers_graphql-0.6.0.tar.gz
Algorithm Hash digest
SHA256 a6d4cdfb50b9492c62ccf4da10152dbbeb8fc2b0d42958f9687ff10f9e115c08
MD5 c30d3841d773273818d6c41b176991e6
BLAKE2b-256 b6a4d51d6bd8433598070f76939db3b73c14f57f4bbf4f52193eac82b25fd6b1

See more details on using hashes here.

File details

Details for the file llama_index_readers_graphql-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_readers_graphql-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_readers_graphql-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18dff663a42d503f2f1e8694221eba02ed9adbd090e1b4ec223b83900dd78eca
MD5 c86eae4482e5a031539afab63dd1c1f0
BLAKE2b-256 b415981b6d7b3118efb462525332d4e1acfeda6da1b9595264b332a5dd0231fa

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page