@homebound/graphql-id-linter
TypeScript icon, indicating that this package has built-in type declarations

2.14.0 • Public • Published

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"

Readme

Keywords

none

Package Sidebar

Install

npm i @homebound/graphql-id-linter

Weekly Downloads

1,594

Version

2.14.0

License

none

Unpacked Size

9.14 kB

Total Files

7

Last publish

Collaborators

  • tyambaohb
  • msalazar-homebound
  • skelly451
  • lbittencurthb
  • maasha
  • jcharpentier
  • sneal88
  • kyeh
  • icampbellsmith
  • msoja-homebound
  • pmishra40
  • fmendeshb
  • arvinsiva
  • bholmes_hb
  • blimmer-
  • zgavin
  • hbitaccounts
  • levi-huynh
  • nbhargava-hb
  • apattersonatx-hb
  • pstone
  • lmunoz_homebound
  • allangaldino
  • eplata.homebound
  • roberth-gomez
  • dmcgarry
  • khalidwilliams
  • atrujillo
  • tylerr909_h
  • zovington
  • blambillottehomebound
  • shaberman
  • larryhomebound
  • cfrazier91
  • foxy
  • homebound-publisher
  • bdow
  • kskano
  • ghaislip