Created
March 26, 2021 22:28
-
-
Save brendanmckenzie/2cfa0c332c0b60b740632fbb0a402a2f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation { | |
updateQuote( | |
input: { | |
patch: { | |
quoteDaysUsingId: { | |
updateById: { | |
patch: { propertyToPropertyId: { connectById: { id: 1 } } } | |
id: 1 | |
} | |
} | |
} | |
id: 1 | |
} | |
) { | |
quote { | |
id | |
quoteDays { | |
nodes { | |
id | |
property { | |
value | |
} | |
} | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table quote | |
( | |
id int not null primary key | |
); | |
create table property | |
( | |
id int not null primary key, | |
value text | |
); | |
create table quote_day | |
( | |
id int not null primary key, | |
quote_id int not null references quote (id), | |
property_id int not null references property (id) | |
); | |
insert into property | |
values (1, 'Property 1'); | |
insert into property | |
values (2, 'Property 2'); | |
insert into quote | |
values (1); | |
insert into quote_day | |
values (1, 1, 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation { | |
updateQuoteDay(input: { id: 1, patch: { propertyId: 1 } }) { | |
quoteDay { | |
property { | |
value | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment