Page MenuHomeElementl

[dagit] Use lint to enforce query inclusion of `id` field

Authored by dish on Nov 13 2020, 6:10 PM.
Referenced Files
Unknown Object (File)
Tue, Sep 13, 11:45 AM
Unknown Object (File)
Thu, Sep 8, 3:50 PM
Unknown Object (File)
Tue, Sep 6, 1:32 PM
Unknown Object (File)
Mon, Sep 5, 12:40 AM
Unknown Object (File)
Sat, Sep 3, 3:07 PM
Unknown Object (File)
Fri, Sep 2, 8:23 AM
Unknown Object (File)
Wed, Aug 31, 2:27 AM
Unknown Object (File)
Sun, Aug 28, 1:38 PM



In an effort to improve our Apollo caching, use id fields more consistently in GraphQL.

  • Add a few new id fields where we currently have a value that can be used, plus a couple others that seemed reasonable (please push back if I'm wrong)
  • Use the GraphQL eslint plugin to enforce that id is used whenever it is available on a type
  • Repair all lint errors by adding id as needed
  • Remove a handful manual ids from AppCache

Ideally we would be able to use this anywhere that Apollo currently shows a cache warning.

Test Plan

Lint, jest, ts. Load Dagit, navigate around and verify that things look fine.

Diff Detail

R1 dagster
dish-id-fields (branched from master)
Lint Errors
No Test Coverage

Event Timeline

Oh this is cool - I didn't realize that there was a linter plugin for this.

I know Apollo will look for "name" or "key" as well and automatically use that, but I think that's not sufficient for pipelines. I wonder if it's preferable to put pipeline IDs in the graphql schema or to define custom ID generators on the apollo side over here ( to prevent collision / weird autogen'd keys?

really missing that relay build step right now

lint errors look legit, but this looks reasonable.

This revision is now accepted and ready to land.Nov 17 2020, 4:06 PM

Lint suppressions on the worker.ts file