You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using graphql persistent queries it is possible to make GET requests using URLs that are possible to cache in the web browser. However this is only possible if the URL always returns the same result for the same queries.
When using the marker in the URL that is not true because the marker can point to different releases at different points in time. So in that case the client always needs to make a request to see if the query result is modified. We can use etag and 304 Not Mofified responses to optimize this but still a request has to be made.
Proposed new situation
If we changed the marker in the URL and used the release id instead, the URL would be possible to cache fully as it would always return the same result for the same query.
To do this we need a way to map marker_name-->release_id. This mapping could be returned if you don't specify the trailing markername/release_id
Today, if you don't specify marker you get a list of possible markers, eg for
where {release_id} would be the actual id of the release.
Compability and breaking changes
In order to keep combability we could still offer the same URL as before with the markername suffix instead. Then these URLs would map to the same endpoint:
Current situation
Today we use a graphql url that points to the marker, eg.
https://public-api.promaster.se/graphql/7290ba61-a9a0-4786-9253-5b70cd83ca6b/production
Using graphql persistent queries it is possible to make GET requests using URLs that are possible to cache in the web browser. However this is only possible if the URL always returns the same result for the same queries.
When using the marker in the URL that is not true because the marker can point to different releases at different points in time. So in that case the client always needs to make a request to see if the query result is modified. We can use
etag
and304 Not Mofified
responses to optimize this but still a request has to be made.Proposed new situation
If we changed the marker in the URL and used the release id instead, the URL would be possible to cache fully as it would always return the same result for the same query.
To do this we need a way to map
marker_name-->release_id
. This mapping could be returned if you don't specify the trailing markername/release_idToday, if you don't specify marker you get a list of possible markers, eg for
https://public-api.promaster.se/graphql/7290ba61-a9a0-4786-9253-5b70cd83ca6b
you get this:
We could change that into this:
where
{release_id}
would be the actual id of the release.Compability and breaking changes
In order to keep combability we could still offer the same URL as before with the markername suffix instead. Then these URLs would map to the same endpoint:
The result of calling the url without the markername suffix would be a breaking change, however I think no applications do this?
The text was updated successfully, but these errors were encountered: