generated from pascalmartineau/wp-skeleton
wip: field groups
All checks were successful
Deploy WordPress and Nuxt / deploy (push) Successful in 1m9s
All checks were successful
Deploy WordPress and Nuxt / deploy (push) Successful in 1m9s
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
fragment SiteOptions on Ccat {
|
||||
fragment SiteOptions on GroupCcat {
|
||||
profiles {
|
||||
url
|
||||
}
|
||||
@@ -6,7 +6,7 @@ fragment SiteOptions on Ccat {
|
||||
|
||||
query siteOptions {
|
||||
siteOptions {
|
||||
ccat {
|
||||
groupCcat {
|
||||
...SiteOptions
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export async function useSiteOptions() {
|
||||
const { data } = await useAsyncGraphqlQuery("siteOptions", {}, { graphqlCaching: { client: true } });
|
||||
if (data.value?.errors?.length || !data.value?.data.siteOptions?.ccat) {
|
||||
if (data.value?.errors?.length || !data.value?.data.siteOptions?.groupCcat) {
|
||||
throw createError({ statusCode: 500, message: "Erreur lors de la récupération des options du site" });
|
||||
}
|
||||
return { ...data.value?.data.siteOptions?.ccat };
|
||||
return { ...data.value?.data.siteOptions?.groupCcat };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user