The DocumentsGraphqlTable
component allows you to use GraphQL queries and visualize the results in a the TDBReactTable, you need to pass your instace of ApolloClient, the GraphQL query and the table and advanced search configuration. Read here for the configuration documentation.
Install the dependencies from npm
View the DocumentsGraphqlTable component integrated inside a dashboard here
Properties | Description |
---|---|
type
The document type
gqlQuery
The GraphQL query
apolloClient
An apollo client instance - Apollo Client documentation
tableConfig
An object with the table configuration to pass to the TDBReactTable Component
advancedSearchConfig
An object with the advancedSearch configuration to pass to the AdvancedSearch Component
onRowClick
A function that acts as a callback when the table row is clicked
onViewButtonClick
A function that acts as a callback when the table row view button is clicked
onEditButtonClick
A function that acts as a callback when the table row edit button is clicked
onDeleteButtonClick
A function that acts as a callback when the table row delete button is clicked
showGraphqlTab
A boolean property to enable the GraphQL query view tab