🚀 DAY 2 OF LAUNCH WEEK: Unify Your Security Stack with Socket Basics.Learn more →
Socket
Book a DemoInstallSign in
Socket

@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

latest
npmnpm
Version
2.14.0
Version published
Maintainers
34
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