Make GraphQL queries more compact
This commit is contained in:
@@ -4,31 +4,29 @@ import { fetchAPI } from '$utils/api'
|
||||
|
||||
export const load: PageServerLoad = async () => {
|
||||
try {
|
||||
const res = await fetchAPI(`
|
||||
query {
|
||||
credits {
|
||||
text
|
||||
list
|
||||
}
|
||||
const res = await fetchAPI(`query {
|
||||
credits {
|
||||
text
|
||||
list
|
||||
}
|
||||
|
||||
credit (filter: { status: { _eq: "published" }}) {
|
||||
name
|
||||
website
|
||||
location {
|
||||
location_id (filter: { status: { _eq: "published" }}) {
|
||||
name
|
||||
credit (filter: { status: { _eq: "published" }}) {
|
||||
name
|
||||
website
|
||||
location {
|
||||
location_id (filter: { status: { _eq: "published" }}) {
|
||||
name
|
||||
slug
|
||||
country {
|
||||
slug
|
||||
country {
|
||||
slug
|
||||
flag {
|
||||
id
|
||||
}
|
||||
flag {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`)
|
||||
}`)
|
||||
|
||||
const { data } = res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user