© {{ new Date().getFullYear() }}
- {{ data.generalSettings.title }}
+ {{ generalSettings.title }}
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"""