feat(pg): support domain constrained composite types#615
feat(pg): support domain constrained composite types#615benjie merged 5 commits intographile:v4from jcgsville:v4
Conversation
|
Thanks @jcgsville; this is effectively a new type so we should add it to Also add a mutation test for it in here: And a query test here: These are all integration tests, effectively. Changes to the above will require a lot of snapshot updates, you can run Thanks! |
…ound type to kitchen sink test
…ound type to query and mutation test
|
Thanks for the guidance @benjie! I added some tests, which pass with Postgres 11, but it looks like Postgres 10 and earlier did not let you create a domain over a composite type, so the tests fail there. Is there a mechanism testing things only in certain versions? |
|
@jcgsville Not a good one, but we did have to avoid PG10 tests running in PG9.6: graphile-engine/packages/postgraphile-core/scripts/test Lines 47 to 54 in 9dca5c8 I'm not happy with our testing system in general (it's very legacy, clunky and slow), and am planning to overhaul it as part of the work I'm doing on V5. |
|
@jcgsville Are you able to add a relevant workaround for PG11 as indicated above? |
|
Merged |
|
Sorry to have not gotten to the testing tweaks sooner. Thanks for ferrying it the rest of the way through 🙂 |
|
No worries 🙌 |
Addresses #600
Input types now support domains that constrain composite types instead of failing to generate the schema on startup.
I didn't add any testing as I was a bit unclear what the testing story is for a change like this. Happy to make any additions in this area with a quick point in the right direction.