Postgraphile: @omit read Crashes postgraphile.

Created on 24 Jul 2018  路  2Comments  路  Source: graphile/postgraphile

I'm submitting a ...

  • [x] bug report
  • [ ] feature request
  • [ ] question

PostGraphile version:


Library: [email protected]

Minimal SQL file that can be loaded into a clean database:

CREATE TABLE post ( 
    id uuid NOT NULL,
    CONSTRAINT post_pk PRIMARY KEY (id),
);

Steps to reproduce:


Add this comment on a primary key or unique constraint

comment on constraint post_pk on post is 
  E'@omit read';

Current behavior:
The server crashes, the schema becomes unavailable in Graphiql and the following error appears: Error: Query root type must be provided.

Expected behavior:
I think the expected behavior is for the Query.postById to disappear from the GraphQL Schema.

馃悰 bug 馃槍 easy

Most helpful comment

It鈥檚 correct to throw an error; but it seems the error is swallowed by the build process so you don鈥檛 actually see it, instead seeing a downstream error - fhat is not correct. I鈥檒l take a look, thanks for the report.

All 2 comments

It鈥檚 correct to throw an error; but it seems the error is swallowed by the build process so you don鈥檛 actually see it, instead seeing a downstream error - fhat is not correct. I鈥檒l take a look, thanks for the report.

馃憤 Have improved error reporting around this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tonyhschu picture tonyhschu  路  3Comments

kilianc picture kilianc  路  4Comments

giacomorebonato picture giacomorebonato  路  3Comments

srghma picture srghma  路  3Comments

WestleyArgentum picture WestleyArgentum  路  3Comments