Socket
Socket
Sign inDemoInstall

@homebound/graphql-id-linter

Package Overview
Dependencies
Maintainers
34
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@homebound/graphql-id-linter


Version published
Weekly downloads
2K
decreased by-2%
Maintainers
34
Weekly downloads
 
Created
Source

graphql-id-linter

According to apollo-client's issue 2510, the apollo client really, really wants you to include ids in every query that touches a type, so that it can maintain its cache.

In theory this is getting fixed in apollo-client 3.0-beta, but always returning id is probably not a bad idea anyway.

Credits, this is a ~80% copy/paste of Cecchi's solution on this comment.

Install

yarn add -D @homebound/graphql-id-linter

Include it in your graphql-codegen.yml:

schema: ./schema.json
documents: src/**/*.graphql
generates:
  src/generated/graphql-types.tsx:
    plugins:
      - "@homebound/graphql-id-linter"

FAQs

Package last updated on 02 Nov 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc