graphql

yenda 2021-01-22T15:50:30.007500Z

I was looking into https://github.com/kamilkisiela/graphql-inspector which would fix Detect breaking changes made to the api and schema coverage checks https://github.com/walmartlabs/lacinia/issues/296 but for that you need the graphQL SDL and you can't do it from the edn schema because Generate GraphQL SDL https://github.com/walmartlabs/lacinia/issues/183 is not supported Is anyone using both lacinia and graphql-inspector? How do you do it? • using graphQL SDL to define your schemas instead of edn so you can compare the diff with the inspector or • you found a way to generate the graphQL SDL? I feel like there is a cumbersome way to generate the SDL using https://graphql.org/graphql-js/utilities/#buildclientschema but I'm wondering if I'm missing something simpler

yenda 2021-01-22T16:52:59.009200Z

Partially answering my own question, you can do: to check your current graphql SDL against a running lacinia pedestal endpoint: graphql-inspector diff resources/graphql.schema.json http://127.0.0.1:5001/api to update your graphql schema with a running lacinia pedestal endpoint: graphql-inspector introspect http://127.0.0.1:5001/api --write resources/graphql.schema.json

hlship 2021-01-22T17:31:03.010200Z

To support federation, I started on writing an emitter that would generate pretty and parsable SDL from the compiled schema, but had to abandon it for time constraints. Hopefully in the next release.

2021-01-22T17:41:20.011500Z

Haha fun, I was doing the same the other day because I was frustrated that directives have no introspection support

2021-01-22T17:42:30.012500Z

(There is no spec! It’s not lacinia’s ‘fault’)