This repository has been archived by the owner on Nov 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This also adds the first tests to make sure everything keeps working
- Loading branch information
1 parent
c7e9b9a
commit 91c6964
Showing
13 changed files
with
354 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@labdigital/graphql-codegen-bruno": minor | ||
--- | ||
|
||
Fix issues with duplicate fragments |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
dist/* | ||
node_modules/* | ||
coverage/* | ||
src/__output__/* |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,20 @@ | ||
# query.graphql | ||
|
||
query GetCustomer($info: CustomerInfo!) { | ||
customer(info: $info) { | ||
...CustomerDetails | ||
} | ||
} | ||
|
||
fragment CustomerDetails on Customer { | ||
firstName | ||
addresses { | ||
...AddressDetails | ||
} | ||
} | ||
|
||
fragment AddressDetails on Address { | ||
id | ||
city | ||
} |
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,41 @@ | ||
type Query { | ||
customer(info: CustomerInfo!): Customer | ||
product(id: ID!): Product | ||
} | ||
|
||
input CustomerInfo { | ||
credentials: Credentials! | ||
authMethod: AuthMethod! | ||
} | ||
|
||
enum AuthMethod { | ||
PHONE | ||
} | ||
|
||
input Credentials { | ||
email: String! | ||
password: String! | ||
} | ||
|
||
type Customer { | ||
id: ID! | ||
firstName: String! | ||
email: String! | ||
addresses: [Address!]! | ||
} | ||
|
||
type Product { | ||
id: ID! | ||
name: String! | ||
price: Float! | ||
} | ||
|
||
type Address { | ||
id: ID! | ||
email: String | ||
firstName: String | ||
lastName: String | ||
city: String | ||
} | ||
|
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,57 @@ | ||
|
||
meta { | ||
name: GetCustomer | ||
type: graphql | ||
} | ||
|
||
post { | ||
url: {{graphql-gateway}}/graphql | ||
body: graphql | ||
auth: none | ||
} | ||
|
||
body:graphql { | ||
query GetCustomer($info: CustomerInfo!) { | ||
customer(info: $info) { | ||
...CustomerDetails | ||
} | ||
} | ||
|
||
fragment CustomerDetails on Customer { | ||
firstName | ||
addresses { | ||
...AddressDetails | ||
} | ||
} | ||
|
||
fragment AddressDetails on Address { | ||
id | ||
city | ||
} | ||
fragment CustomerDetails on Customer { | ||
firstName | ||
addresses { | ||
...AddressDetails | ||
} | ||
} | ||
fragment AddressDetails on Address { | ||
id | ||
city | ||
} | ||
|
||
} | ||
|
||
body:graphql:vars { | ||
{ | ||
"info": { | ||
"credentials": { | ||
"email": "example", | ||
"password": "example" | ||
}, | ||
"authMethod": "EMAIL" | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.