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();