Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
graphql-codegen-apollo-cache
Advanced tools
GraphQL Code Generator plugin for generating a functions to read and write from the apollo cache
GraphQL Code Generator plugin for generating a functions to read and write from the apollo cache
npm i graphql-codegen-apollo-cache
excludePatterns
(default: null): regexp to exclude operation namesexcludePatternsOptions
(default: ''): regexp flags to exclude operation namesapolloVersion
(default: 2): apollo client versionapolloCacheImportFrom
(default: apollo-cache-inmemory): apollo-cache-inmemory dependencyapolloImportFrom
(default: apollo-client v2 or @apollo/client v3): apollo client dependencydataIdFromObjectImport
(default: apollo-cache-inmemory): custom dataIdFromObject dependencydataIdFromObjectName
: dataIdFromObject function namegenerateFragmentsRead
(default: true): generate fragments read functionsgenerateFragmentsWrite
(default: true): generate fragments write functionsgenerateQueriesWrite
(default: true): generate query read functionsgenerateQueriesWrite
(default: true): generate query write functionscustomImports
(default: ''): full custom import declarationpre
(default: ''): custom code before each functionpost
(default: ''): custom code after each functionoverwrite: true
schema:
- 'https://myschema/graphql'
documents:
- 'src/**/*.graphql'
generates:
src/@types/codegen/graphql.tsx:
plugins:
- 'typescript'
- 'typescript-operations'
- 'typescript-react-apollo'
src/@types/codegen/cache.tsx:
config:
documentMode: external
importDocumentNodeExternallyFrom: ./graphql
preset: import-types
presetConfig:
typesPath: ./graphql
plugins:
- ./build/src/index.js
hooks:
afterAllFileWrite:
- prettier --write
FAQs
GraphQL Code Generator plugin for generating a functions to read and write from the apollo cache
The npm package graphql-codegen-apollo-cache receives a total of 45 weekly downloads. As such, graphql-codegen-apollo-cache popularity was classified as not popular.
We found that graphql-codegen-apollo-cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.