Article Metafields

etn207
New Member
4 0 0

I'm trying to retrieve a metafield from a article using the below query:

 

{
  blogByHandle(handle: "events") {
  	articleByHandle(handle: "event-item-2") {
    	metafield(namespace: "events", key: "date") {
      	value
    	}
  	}
  }
}

 

I keep receiving an error that metafield doesn't exiti on type Article. Any thoughts?

0 Likes
etn207
New Member
4 0 0

Maybe you're not able to currently return Article metafields with the storefront api? It's not listed as a type here

If true, that's a bit unfortunate. Does anyone have another way to grab this data?

0 Likes