ideas icon indicating copy to clipboard operation
ideas copied to clipboard

site arg for graphql globalSets

Open Narretz opened this issue 1 year ago • 0 comments

Right now, there's no way to get the globalSets of a site other than the default site without knowing the handle names. E.g. you can't do:

query Globals{
  globalSets(site: 'en') {
    handle
    ... on GlobalSet_Footer {
      main_text
    }
    ... on GlobalSet_SocialMedia {
      title
    }     
  }
}

Instead you have to do

query Globals{
  globalSet(site: "en", handle: "footer") {
    handle
    ... on GlobalSet_Footer {
      main_text
    }
  }
}

and so on.

This is very annoying and could be fixed by adding this site argument.

Narretz avatar Feb 08 '24 21:02 Narretz