DataSQRL / sqrl

Flexible development framework for building streaming data applications in SQL with Kafka, Flink, Postgres, GraphQL, and more.
https://www.datasqrl.com/
97 stars 14 forks source link

Exception thrown when using an filter on Subscription with unrecognized field #989

Closed mbroecheler closed 2 weeks ago

mbroecheler commented 2 weeks ago

When adding a subscription with a filter on a field that does not exist (e.g. mistyped the field), the following exception gets thrown which does not specify what is wrong:

java.lang.NullPointerException
        at com.datasqrl.graphql.inference.GraphqlModelGenerator.walkSubscription(GraphqlModelGenerator.java:94)
        at com.datasqrl.graphql.inference.SchemaWalker.walkSubscription(SchemaWalker.java:61)
        at com.datasqrl.graphql.inference.SchemaWalker.lambda$walk$1(SchemaWalker.java:53)
        at java.base/java.util.Optional.ifPresent(Optional.java:183)
        at com.datasqrl.graphql.inference.SchemaWalker.walk(SchemaWalker.java:53)
        at com.datasqrl.actions.GraphqlPostplanHook.updatePlan(GraphqlPostplanHook.java:34)
        at com.datasqrl.compile.CompilationProcess.executeCompilation(CompilationProcess.java:68)
        at com.datasqrl.cmd.AbstractCompilerCommand.execute(AbstractCompilerCommand.java:110)
        at com.datasqrl.cmd.AbstractCompilerCommand.execute(AbstractCompilerCommand.java:69)
        at com.datasqrl.cmd.AbstractCommand.run(AbstractCommand.java:26)
        at picocli.CommandLine.executeUserObject(CommandLine.java:2030)
        at picocli.CommandLine.access$1500(CommandLine.java:148)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
        at picocli.CommandLine.execute(CommandLine.java:2174)
        at com.datasqrl.DatasqrlCMD.main(DatasqrlCMD.java:13)
java.lang.NullPointerException
        at com.datasqrl.graphql.inference.GraphqlModelGenerator.walkSubscription(GraphqlModelGenerator.java:94)
        at com.datasqrl.graphql.inference.SchemaWalker.walkSubscription(SchemaWalker.java:61)
        at com.datasqrl.graphql.inference.SchemaWalker.lambda$walk$1(SchemaWalker.java:53)
        at java.base/java.util.Optional.ifPresent(Optional.java:183)
        at com.datasqrl.graphql.inference.SchemaWalker.walk(SchemaWalker.java:53)
        at com.datasqrl.actions.GraphqlPostplanHook.updatePlan(GraphqlPostplanHook.java:34)
        at com.datasqrl.compile.CompilationProcess.executeCompilation(CompilationProcess.java:68)
        at com.datasqrl.cmd.AbstractCompilerCommand.execute(AbstractCompilerCommand.java:110)
        at com.datasqrl.cmd.AbstractCompilerCommand.execute(AbstractCompilerCommand.java:69)
        at com.datasqrl.cmd.AbstractCommand.run(AbstractCommand.java:26)
        at picocli.CommandLine.executeUserObject(CommandLine.java:2030)
        at picocli.CommandLine.access$1500(CommandLine.java:148)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
        at picocli.CommandLine.execute(CommandLine.java:2174)
        at com.datasqrl.DatasqrlCMD.main(DatasqrlCMD.java:13)
[FATAL]