import { json } from 'remix'
import { gql } from 'graphql-request'
import { gqlClient } from 'graphql.server'

export const loader = async ({ request }) => {
    const { entries } = await gqlClient(request).request(gql`
        {
            YOUR GRAPHQL QUERY HERE
        }
    `)

    return json({ entries })
}