Open Meemaw opened 1 year ago
It would be great if response headers from the GraphQL request done on server would be exposed to serverSidePostQuery.
serverSidePostQuery
Use-case: Backend can set the cache-control header on GraphQL responses, which could be read in serverSidePostQuery and set on the page:
cache-control
serverSidePostQuery: (_, ctx) => { ctx.res.setHeader( 'cache-control', headerFromBackend ); }
Could try to contribute this, if you think this makes sense and would be open to accepting PR for it.
This is a great idea! Would happily accept a PR!
It would be great if response headers from the GraphQL request done on server would be exposed to
serverSidePostQuery
.Use-case: Backend can set the
cache-control
header on GraphQL responses, which could be read inserverSidePostQuery
and set on the page:Could try to contribute this, if you think this makes sense and would be open to accepting PR for it.