DROP TABLE IF EXISTS contacts;
DROP TABLE IF EXISTS customers;
CREATE TABLE customers(
id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
customer_name VARCHAR(255) NOT NULL
);
CREATE TABLE contacts(
id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
phone VARCHAR(15) NOT NULL,
customer_id INT REFERENCES customers (id)
);
INSERT INTO customers (customer_name) VALUES ('Some Name');
INSERT INTO contacts (phone, customer_id) VALUES ('+1111111', 1);
Summary
In case of
PostGraphileRelayPreset
mutation with "null" fk value does not work (returns null)Steps to reproduce
Create Postgre envs:
Run server:
node server-express.mjs
Run mutation:
Expected results
Actual results
Possible Solution
package-lock.json
created on 13.12.2023 with"graphile": "^5.0.0-beta.11"
fixes the problem.