Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
graphql-document-collector
Advanced tools
Load up smartly, in one location, all of the GraphQL queries/mutations/subscriptions of your project
Load up smartly, in one location, all of the GraphQL queries/mutations/subscriptions of your project
npm i -g graphql-document-collector
graphql-document-collector
has a straightforward CLI interface to precompile all of your GraphQL documents in one definition file:
graphql-document-collector '$glob' > $dest
Collect all .graphql
files of your project in a single documents.json
definition file:
graphql-document-collector '**/*.graphql' > documents.json
This can be exploited afterwards like this:
// Note: if you are using webpack, you will need to setup a 'json-loader'
const graphqlDocs = require('./documents.json');
// You can use any client able to read some graphql document AST
apolloClient.query({query: graphqlDocs['queries/ListMovies.graphql']})
.then(({data}) => {/* ... */});
Note: you don't have to worry about loading fragments, they are already resolved in the document.
FAQs
Load up smartly, in one location, all of the GraphQL queries/mutations/subscriptions of your project
The npm package graphql-document-collector receives a total of 4,326 weekly downloads. As such, graphql-document-collector popularity was classified as popular.
We found that graphql-document-collector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.