refactor: OptionsSite => SiteOptions for clearer naming

This commit is contained in:
2026-01-30 08:58:28 -05:00
parent 1e58b1f1e7
commit fefa98021b
8 changed files with 57 additions and 51 deletions

View File

@@ -51,10 +51,10 @@
],
"acfe_form": 0,
"show_in_graphql": 1,
"graphql_field_name": "GroupSite",
"graphql_field_name": "GroupSiteOptions",
"map_graphql_types_from_location_rules": 0,
"graphql_types": "",
"acfe_meta": "",
"acfe_note": "",
"modified": 1769087407
"modified": 1769781294
}

View File

@@ -20,6 +20,6 @@
"post_id": "",
"autoload": 0,
"show_in_graphql": 1,
"graphql_type_name": "OptionsSite",
"modified": 1769086997
"graphql_type_name": "SiteOptions",
"modified": 1769693948
}

View File

@@ -1,10 +1,10 @@
<script setup lang="ts">
const { data } = await useAsyncGraphQLQuery("GeneralSettings", undefined, { cache: { ttl: 0 } });
const { data: generalSettings } = await useGeneralSettings();
</script>
<template>
<div>
© {{ new Date().getFullYear() }}
<span v-if="data.generalSettings?.title">{{ data.generalSettings.title }}</span>
<span v-if="generalSettings?.title">{{ generalSettings.title }}</span>
</div>
</template>

View File

@@ -0,0 +1,3 @@
export const useGeneralSettings = () => useAsyncGraphQLQuery("GeneralSettings", {}, {
transform: ({ generalSettings }) => generalSettings,
});

View File

@@ -0,0 +1,3 @@
export const useSiteOptions = () => useAsyncGraphQLQuery("SiteOptions", {}, {
transform: ({ siteOptions }) => siteOptions?.groupSiteOptions,
});

View File

@@ -1,11 +0,0 @@
fragment SiteOptions on GroupSite_Fields {
email
}
query OptionsSite {
optionsSite {
groupSite {
... SiteOptions
}
}
}

View File

@@ -0,0 +1,11 @@
fragment SiteOptions on GroupSiteOptions {
email
}
query SiteOptions {
siteOptions {
groupSiteOptions {
... SiteOptions
}
}
}

View File

@@ -3685,11 +3685,11 @@ interface GroupPostPage_Fields implements AcfFieldGroup & AcfFieldGroupFields &
}
"""
The &quot;GroupSite&quot; Field Group. Added to the Schema by &quot;WPGraphQL for ACF&quot;.
The &quot;GroupSiteOptions&quot; Field Group. Added to the Schema by &quot;WPGraphQL for ACF&quot;.
"""
type GroupSite implements AcfFieldGroup & AcfFieldGroupFields & GroupSite_Fields {
type GroupSiteOptions implements AcfFieldGroup & AcfFieldGroupFields & GroupSiteOptions_Fields {
"""
Field of the &quot;email&quot; Field Type added to the schema as part of the &quot;GroupSite&quot; Field Group
Field of the &quot;email&quot; Field Type added to the schema as part of the &quot;GroupSiteOptions&quot; Field Group
"""
email: String!
@@ -3698,11 +3698,11 @@ type GroupSite implements AcfFieldGroup & AcfFieldGroupFields & GroupSite_Fields
}
"""
Interface representing fields of the ACF &quot;GroupSite&quot; Field Group
Interface representing fields of the ACF &quot;GroupSiteOptions&quot; Field Group
"""
interface GroupSite_Fields implements AcfFieldGroup & AcfFieldGroupFields {
interface GroupSiteOptions_Fields implements AcfFieldGroup & AcfFieldGroupFields {
"""
Field of the &quot;email&quot; Field Type added to the schema as part of the &quot;GroupSite&quot; Field Group
Field of the &quot;email&quot; Field Type added to the schema as part of the &quot;GroupSiteOptions&quot; Field Group
"""
email: String!
@@ -6177,23 +6177,6 @@ interface OneToOneConnection implements Edge {
node: Node!
}
type OptionsSite implements AcfOptionsPage & Node & WithAcfGroupSite {
"""Fields of the GroupSite ACF Field Group"""
groupSite: GroupSite
"""The globally unique ID for the object"""
id: ID!
""""""
menuTitle: String
""""""
pageTitle: String
""""""
parentId: String
}
"""
Sort direction for ordered results. Determines whether items are returned in ascending or descending order.
"""
@@ -8860,7 +8843,7 @@ interface Previewable {
}
"""The root entry point into the Graph"""
type Query implements WithAcfOptionsPageOptionsSite {
type Query implements WithAcfOptionsPageSiteOptions {
"""Entry point to get all settings for the site"""
allSettings: Settings
@@ -9145,9 +9128,6 @@ type Query implements WithAcfOptionsPageOptionsSite {
uri: String!
): UniformResourceIdentifiable
""""""
optionsSite: OptionsSite
"""An object of the page Type. """
page(
"""
@@ -9372,6 +9352,9 @@ type Query implements WithAcfOptionsPageOptionsSite {
where: RootQueryToRevisionsConnectionWhereArgs
): RootQueryToRevisionsConnection
""""""
siteOptions: SiteOptions
"""A 0bject"""
tag(
"""The globally unique identifier of the object."""
@@ -13608,6 +13591,23 @@ type Settings {
writingSettingsUseSmilies: Boolean
}
type SiteOptions implements AcfOptionsPage & Node & WithAcfGroupSiteOptions {
"""Fields of the GroupSiteOptions ACF Field Group"""
groupSiteOptions: GroupSiteOptions
"""The globally unique ID for the object"""
id: ID!
""""""
menuTitle: String
""""""
pageTitle: String
""""""
parentId: String
}
"""The Login client options for the siteToken provider."""
type SiteTokenClientOptions implements LoginClientOptions {
"""
@@ -16559,17 +16559,17 @@ interface WithAcfGroupPostPage {
}
"""
Provides access to fields of the &quot;GroupSite&quot; ACF Field Group via the &quot;groupSite&quot; field
Provides access to fields of the &quot;GroupSiteOptions&quot; ACF Field Group via the &quot;groupSiteOptions&quot; field
"""
interface WithAcfGroupSite {
"""Fields of the GroupSite ACF Field Group"""
groupSite: GroupSite
interface WithAcfGroupSiteOptions {
"""Fields of the GroupSiteOptions ACF Field Group"""
groupSiteOptions: GroupSiteOptions
}
"""Access point for the &quot;OptionsSite&quot; ACF Options Page"""
interface WithAcfOptionsPageOptionsSite {
"""Access point for the &quot;SiteOptions&quot; ACF Options Page"""
interface WithAcfOptionsPageSiteOptions {
""""""
optionsSite: OptionsSite
siteOptions: SiteOptions
}
"""The writing setting type"""