cube icon indicating copy to clipboard operation
cube copied to clipboard

Does Cube have a way to test syntax for new schemas before deploying them?

Open Martelloti opened this issue 2 years ago • 2 comments

Problem

I'd like to know if is there a possibility to use something related to Linter so that we can test a schema (alongside a sample payload) before deploying it. Our use case would be disposing our infrastructure to an outside client that would deploy its own schemas, but we wanted to make sure they would work before deploying them.

Martelloti avatar Jul 19 '22 17:07 Martelloti

Hi @Martelloti ! Schema validation won't let you adding nonexisting fields and will fail during parsing. I have to notice that using linter with dynamic schemas with async requests will be hard to implement. Could you add share more details on your expectations here?

ivan-vdovin avatar Jul 20 '22 11:07 ivan-vdovin

@Martelloti Simplest way to do it is to run schema compilation. Cube Cloud does it on every change you make during your development process to show you errors if there're any.

paveltiunov avatar Jul 29 '22 05:07 paveltiunov