Query id, uid, type, lang and url for a type of document

Hello

I'd like to only query the id, uid, type, lang and url for a document type ?

I'm currently writing an API endpoint in my next.js application that will render pages for a specific type of document.

I wrote the code below where documentType is a parameter :

graphQuery: `{
  ${documentType} {
	  ...${documentType}Fields
  }
}`

It works, but I get to much information, and particularly the data that I don't want for my request.

Do you have an idea ? Thanks

Hi Jeff,

Welcome to the community :slight_smile:

GraphQuery doesn't allow fetching only metadata.

Can you tell me more about your use case and why you only want to query the id, uid, type, lang and URL?

Thanks.