Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/danielroe/roe.dev. This is the code and content for my personal website, built in Nuxt. roe.dev
Something went wrong. Try again.
1234567891011121314151617export const query = (accessToken: string, query: string) => fetch('https://api.github.com/graphql', { method: 'POST', headers: { 'authorization': `Bearer ${accessToken}`, 'user-agent': 'roe (https://roe.dev, 0.1)', }, body: JSON.stringify({ query }), }) .then(r => r.json() as Promise<{ data: any }>) .then(r => { if ('errors' in r) { throw r } return r.data })