Repository navigation
feat: adding cache-graphql command to faststore/cli - #3122
Conversation
…eer like the core and api packages
6de7787 to
e802b3d
Compare
e802b3d to
009860a
Compare
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
215f510 to
a093bd5
Compare
lemagnetic
left a comment
There was a problem hiding this comment.
Tested cache-graphql command. It works correctly - discovery.config.default.js was updated with 21 queries in `cachedOperations
eduardoformiga
left a comment
There was a problem hiding this comment.
Questions:
Should we use only the starter to test in this PR? I can't see the scripts command as previously in the core package.
Can you please provide a starter PR/preview so that we can test it in a best way or provide the steps to test the changes?
You can test it by running the cli on the starter or on the core mannualy. Ex:
Builds the cli, and regenerated the types to create the persisted-documents.json file and run the cache-graphql. After running it you should see the discovery.config.default.js changed to include all the queries names that would be cached. |
| run: | | ||
| cd starter | ||
| yarn install | ||
| yarn add [email protected] |
There was a problem hiding this comment.
🎗️ Remember to include it on the starter template afterward instead of here.
| "graphql": "catalog:" | ||
| }, | ||
| "engines": { | ||
| "node": ">=20" |
There was a problem hiding this comment.
I'm not sure when we did this update, but I think we also need to remember to update this config in the starter template.
🎗️ Remember to include it on the starter template.
current setting in starter template:
"volta": {
"node": "18.19.0",
"yarn": "1.19.1"
},
Co-authored-by: Fanny Chien <[email protected]>
|
|
||
| /* This piece of code was taken out of @faststore/graphql-utils */ | ||
| const baseRequest = async <V = any, D = any>( | ||
| /* This piece of code was taken out of @vtex/faststore-graphql-utils */ |
There was a problem hiding this comment.
| /* This piece of code was taken out of @vtex/faststore-graphql-utils */ | |
| /* This piece of code was taken out of @faststore/graphql-utils */ |
I think this was before undoing the renaming 🤔

You can test it by running the cli on the starter or on the core mannualy.
Ex:
Builds the cli, and regenerated the types to create the persisted-documents.json file and run the cache-graphql.
After running it you should see the discovery.config.default.js changed to include all the queries names that would be cached.