Application Modules

Fetching Graph Data

Fetch graph data from client-side applications by posting GraphQL queries to the local /graphql endpoint.

Fetching Graph Data

Client-side applications can natively fetch data from the graph by making POST requests to the local /graphql endpoint:

const response = await fetch('/graphql', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ query: '{ resources { id name } }' })
});
const { data } = await response.json();