Created
October 29, 2023 12:52
-
-
Save ChrisHPZ/5f4f58229a37870598d7a47c3c1f2f84 to your computer and use it in GitHub Desktop.
Advanced Custom Fields Query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { graphqlRequest } from "./graphqlRequest"; | |
| export async function getContactInfo() { | |
| const query = { | |
| query:` | |
| query acfContactInfo { | |
| aCFOptions { | |
| optionsFields { | |
| contactText | |
| emailAddress | |
| phoneNumber | |
| } | |
| } | |
| } | |
| ` | |
| } | |
| const resJson = await graphqlRequest(query); | |
| const contactInfo = resJson.data.aCFOptions; | |
| return contactInfo; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment