diff --git a/wp-content/themes/moonshine/acf-json/group_options_site.json b/wp-content/themes/moonshine/acf-json/group_options_site.json index ecedfe8..77d8ebb 100644 --- a/wp-content/themes/moonshine/acf-json/group_options_site.json +++ b/wp-content/themes/moonshine/acf-json/group_options_site.json @@ -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 } diff --git a/wp-content/themes/moonshine/acf-json/ui_options_page_site.json b/wp-content/themes/moonshine/acf-json/ui_options_page_site.json index 347695d..1dac9e3 100644 --- a/wp-content/themes/moonshine/acf-json/ui_options_page_site.json +++ b/wp-content/themes/moonshine/acf-json/ui_options_page_site.json @@ -20,6 +20,6 @@ "post_id": "", "autoload": 0, "show_in_graphql": 1, - "graphql_type_name": "OptionsSite", - "modified": 1769086997 + "graphql_type_name": "SiteOptions", + "modified": 1769693948 } diff --git a/wp-content/themes/moonshine/app/components/site/SiteFooterCopyright.vue b/wp-content/themes/moonshine/app/components/site/SiteFooterCopyright.vue index e9805d2..7b76191 100644 --- a/wp-content/themes/moonshine/app/components/site/SiteFooterCopyright.vue +++ b/wp-content/themes/moonshine/app/components/site/SiteFooterCopyright.vue @@ -1,10 +1,10 @@ diff --git a/wp-content/themes/moonshine/app/composables/useGeneralSettings.ts b/wp-content/themes/moonshine/app/composables/useGeneralSettings.ts new file mode 100644 index 0000000..2aabf90 --- /dev/null +++ b/wp-content/themes/moonshine/app/composables/useGeneralSettings.ts @@ -0,0 +1,3 @@ +export const useGeneralSettings = () => useAsyncGraphQLQuery("GeneralSettings", {}, { + transform: ({ generalSettings }) => generalSettings, +}); diff --git a/wp-content/themes/moonshine/app/composables/useSiteOptions.ts b/wp-content/themes/moonshine/app/composables/useSiteOptions.ts new file mode 100644 index 0000000..32672bd --- /dev/null +++ b/wp-content/themes/moonshine/app/composables/useSiteOptions.ts @@ -0,0 +1,3 @@ +export const useSiteOptions = () => useAsyncGraphQLQuery("SiteOptions", {}, { + transform: ({ siteOptions }) => siteOptions?.groupSiteOptions, +}); diff --git a/wp-content/themes/moonshine/app/graphql/OptionsSite.query.gql b/wp-content/themes/moonshine/app/graphql/OptionsSite.query.gql deleted file mode 100644 index b5e6fcf..0000000 --- a/wp-content/themes/moonshine/app/graphql/OptionsSite.query.gql +++ /dev/null @@ -1,11 +0,0 @@ -fragment SiteOptions on GroupSite_Fields { - email -} - -query OptionsSite { - optionsSite { - groupSite { - ... SiteOptions - } - } -} diff --git a/wp-content/themes/moonshine/app/graphql/SiteOptions.query.gql b/wp-content/themes/moonshine/app/graphql/SiteOptions.query.gql new file mode 100644 index 0000000..a5d40ce --- /dev/null +++ b/wp-content/themes/moonshine/app/graphql/SiteOptions.query.gql @@ -0,0 +1,11 @@ +fragment SiteOptions on GroupSiteOptions { + email +} + +query SiteOptions { + siteOptions { + groupSiteOptions { + ... SiteOptions + } + } +} diff --git a/wp-content/themes/moonshine/server/graphql/schema.graphql b/wp-content/themes/moonshine/server/graphql/schema.graphql index 4f8c195..803fa9b 100644 --- a/wp-content/themes/moonshine/server/graphql/schema.graphql +++ b/wp-content/themes/moonshine/server/graphql/schema.graphql @@ -3685,11 +3685,11 @@ interface GroupPostPage_Fields implements AcfFieldGroup & AcfFieldGroupFields & } """ -The "GroupSite" Field Group. Added to the Schema by "WPGraphQL for ACF". +The "GroupSiteOptions" Field Group. Added to the Schema by "WPGraphQL for ACF". """ -type GroupSite implements AcfFieldGroup & AcfFieldGroupFields & GroupSite_Fields { +type GroupSiteOptions implements AcfFieldGroup & AcfFieldGroupFields & GroupSiteOptions_Fields { """ - Field of the "email" Field Type added to the schema as part of the "GroupSite" Field Group + Field of the "email" Field Type added to the schema as part of the "GroupSiteOptions" Field Group """ email: String! @@ -3698,11 +3698,11 @@ type GroupSite implements AcfFieldGroup & AcfFieldGroupFields & GroupSite_Fields } """ -Interface representing fields of the ACF "GroupSite" Field Group +Interface representing fields of the ACF "GroupSiteOptions" Field Group """ -interface GroupSite_Fields implements AcfFieldGroup & AcfFieldGroupFields { +interface GroupSiteOptions_Fields implements AcfFieldGroup & AcfFieldGroupFields { """ - Field of the "email" Field Type added to the schema as part of the "GroupSite" Field Group + Field of the "email" Field Type added to the schema as part of the "GroupSiteOptions" 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 "GroupSite" ACF Field Group via the "groupSite" field +Provides access to fields of the "GroupSiteOptions" ACF Field Group via the "groupSiteOptions" 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 "OptionsSite" ACF Options Page""" -interface WithAcfOptionsPageOptionsSite { +"""Access point for the "SiteOptions" ACF Options Page""" +interface WithAcfOptionsPageSiteOptions { """""" - optionsSite: OptionsSite + siteOptions: SiteOptions } """The writing setting type"""