Graphql
GraphQLReader #
Bases: BaseReader
GraphQL reader.
Combines all GraphQL results into the Document used by LlamaIndex.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
uri |
str
|
GraphQL uri. |
None
|
headers |
Optional[Dict]
|
Optional http headers. |
None
|
Source code in llama-index-integrations/readers/llama-index-readers-graphql/llama_index/readers/graphql/base.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
load_data #
load_data(query: str, variables: Optional[Dict] = None) -> List[Document]
Run query with optional variables and turn results into documents.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query |
str
|
GraphQL query string. |
required |
variables |
Optional[Dict]
|
optional query parameters. |
None
|
Returns:
Type | Description |
---|---|
List[Document]
|
List[Document]: A list of documents. |
Source code in llama-index-integrations/readers/llama-index-readers-graphql/llama_index/readers/graphql/base.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|