-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: fix formatting errors in query collection metadata
closes #7616 closes #8205 PR-URL: hasura/graphql-engine-mono#3955 GitOrigin-RevId: dc97e23e78d522cb7ac4d57ad825526eaa90a4de
- Loading branch information
1 parent
127bdcd
commit e46777b
Showing
7 changed files
with
150 additions
and
20 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,9 @@ | |
- name: getArticles | ||
query: | | ||
query getArticles { | ||
articles { | ||
title | ||
id | ||
content | ||
} | ||
articles { | ||
title | ||
id | ||
content | ||
} | ||
} |
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
19 changes: 19 additions & 0 deletions
19
cli/internal/metadataobject/querycollections/testdata/export_test/t4/metadata.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"query_collections": [ | ||
{ | ||
"name": "allowed-queries", | ||
"definition": { | ||
"queries": [ | ||
{ | ||
"name": "getCompanies", | ||
"query": "query MyQuery {\n company {\n company_addresses {\n address {\n address_line_1\n address_line_2\n city\n country\n postal_code\n state\n }\n }\n id\n name\n }\n}" | ||
}, | ||
{ | ||
"name": "addCompany", | ||
"query": "mutation MyQuery {\n insert_company(objects: {\n company_addresses: {\n data: {\n id: \"94909f0b-e9db-4ce6-809b-0de59463caf1\",\n address: {\n data: {\n address_line_1: \"16, swastik circle\", \n address_line_2: \"\", \n city: \"Ahmedabad\", \n country: \"india\", \n id: \"1354fd0e-cb95-49ae-97d4-9ebfa225e831\",\n postal_code: \"312203\", \n state: \"Gujarat\"\n },\n on_conflict: {constraint: address_pkey}\n }\n }\n }, \n name: \"cygnet\", \n id: \"81c20bdf-fc22-473b-9ffb-173f4d6c6da2\"\n }) {\n affected_rows\n }\n}" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
28 changes: 28 additions & 0 deletions
28
...ernal/metadataobject/querycollections/testdata/export_test/t4/want.query_collections.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
- name: allowed-queries | ||
definition: | ||
queries: | ||
- name: getCompanies | ||
query: | | ||
query MyQuery { | ||
company { | ||
company_addresses { | ||
address { | ||
address_line_1 | ||
address_line_2 | ||
city | ||
country | ||
postal_code | ||
state | ||
} | ||
} | ||
id | ||
name | ||
} | ||
} | ||
- name: addCompany | ||
query: | | ||
mutation MyQuery { | ||
insert_company(objects: {company_addresses:{data:{id:"94909f0b-e9db-4ce6-809b-0de59463caf1",address:{data:{address_line_1:"16, swastik circle",address_line_2:"",city:"Ahmedabad",country:"india",id:"1354fd0e-cb95-49ae-97d4-9ebfa225e831",postal_code:"312203",state:"Gujarat"},on_conflict:{constraint:address_pkey}}}},name:"cygnet",id:"81c20bdf-fc22-473b-9ffb-173f4d6c6da2"}) { | ||
affected_rows | ||
} | ||
} |