-
Notifications
You must be signed in to change notification settings - Fork 57
Add hash_ids flag to override default integer values #35
base: master
Are you sure you want to change the base?
Conversation
@jasonmorita: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
@@ -376,7 +405,7 @@ describe('addPersistedQueries', () => { | |||
const networkInterface = new GenericNetworkInterface(); | |||
addPersistedQueries(networkInterface, queryMap); | |||
const expectedId = queryMap[getQueryDocumentKey(request.query)]; | |||
return networkInterface.query(request).then((persistedQuery: persistedQueryType) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was giving a TS error.
@stubailo Hi, just a bump :) |
Hi @jasonmorita - sorry for the delay. I'll look at this shortly. |
@Poincare After thinking about this some more in the last few weeks, we have started to realize that it might be helpful to also use the operation name in the key. Like What are your thoughts on that? The use-case we have is that we have more than one client, but we want to use persisted queries and have them reference the same queries on the GQL server by some sort of human readable name. I think the short-term goal would be to generate the query map on the client based on the queries a React app is using and then store that map on the server. |
@jasonmorita I think the relevant issue here is #34. There will likely be an effort to change the structure that |
Any update on this? <3 |
@mergebandit Basically, we have to move to using |
@Poincare Is this being actively worked on? What's the path forward for PQs? |
@Poincare Looks like |
@austinmcorso Hey, is this gonna be merged? |
@jasonmorita I'm not a maintainer, do require similar functionality so hoping it does |
When experimenting with using persisted queries, I found that trying have multiple clients caused potential query ID collisions due to the use of incremental integers as IDs.
This adds the option to use a hash of the query as the ID to allow multiple query maps to be combined and used on the server.