HomeElementl

[dagit] Stop diffing schema.graphql during build

Description

[dagit] Stop diffing schema.graphql during build

Summary:
We currently fail the build if the build-generated schema.graphql mismatches the diff, in an effort to guard against bad GraphQL usage. However, since all of our GraphQL consumption occurs with TypeScript types, this diff check is unlikely to be necessary. That is, any usage of GraphQL types should have extensive TypeScript coverage anyway, so if there are problems, re-generating types and running TypeScript should be sufficient to catch any problems with stale types.

We can therefore stop checking in schema.graphql, and stop diffing it during the build. It can be generated for the purposes of checking TS and lint, and otherwise not necessary to keep. If there are problems with staleness, the TS check should be sufficient.

I have also combined download-schema and generate-types into a single generate-graphql command, as I'm not aware of an existing need for download-schema independent of generating TS types and the possibleTypes JSON file.

Test Plan:
Run yarn generate-graphql from packages/core, verify success. Add a bogus type to a query, re-run, verify failure.

Run tox locally with the bogus type in place, verify failure. Remove the bogus type, verify success.

Reviewers: bengotow, dgibson

Reviewed By: dgibson

Differential Revision: https://dagster.phacility.com/D8244

Details

Provenance
dishAuthored on Jun 4 2021, 1:53 PM
Reviewer
dgibson
Differential Revision
D8244: [dagit] Stop diffing schema.graphql during build
Parents
R1:0567e6699536: K8s executor docs
Branches
Unknown
Tags
Unknown