Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable nested variables in stiching #1746

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(Stiching): update schema
  • Loading branch information
PascalSenn committed Apr 21, 2020
commit 689fab2b9ec2223e93254877d173184550598ead
Original file line number Diff line number Diff line change
@@ -27,6 +27,8 @@ type Consultant @source(name: "Consultant", schema: "B") {
union CustomerOrConsultant @source(name: "CustomerOrConsultant", schema: "B") = Customer | Consultant

input ComplexInputType @source(name: "ComplexInputType", schema: "B") {
value: String
deeper: ComplexInputType
deeperArray: [ComplexInputType]
value: String
valueArray: [String]
}
Original file line number Diff line number Diff line change
@@ -33,6 +33,8 @@ type Consultant @source(name: "Consultant", schema: "B") {
union CustomerOrConsultant @source(name: "CustomerOrConsultant", schema: "B") = Customer | Consultant

input ComplexInputType @source(name: "ComplexInputType", schema: "B") {
value: String
deeper: ComplexInputType
deeperArray: [ComplexInputType]
value: String
valueArray: [String]
}
Original file line number Diff line number Diff line change
@@ -35,6 +35,8 @@ type Consultant @source(name: "Consultant", schema: "B") {
union CustomerOrConsultant @source(name: "CustomerOrConsultant", schema: "B") = Customer | Consultant

input ComplexInputType @source(name: "ComplexInputType", schema: "B") {
value: String
deeper: ComplexInputType
deeperArray: [ComplexInputType]
value: String
valueArray: [String]
}
10 changes: 6 additions & 4 deletions src/Stitching/Stitching.Tests/__resources__/Customer.graphql
Original file line number Diff line number Diff line change
@@ -8,17 +8,19 @@ type Customer {
id: ID!
name: String!
consultant: Consultant
complexArg(arg:ComplexInputType): String
complexArg(arg: ComplexInputType): String
}

type Consultant {
id: ID!
name: String!
}

union CustomerOrConsultant = Customer | Consultant
union CustomerOrConsultant = Customer | Consultant

input ComplexInputType {
value: String
deeper: ComplexInputType
}
deeperArray: [ComplexInputType]
value: String
valueArray: [String]
}
Original file line number Diff line number Diff line change
@@ -49,6 +49,8 @@ type SomeOtherContract implements Contract {
union CustomerOrConsultant = Customer | Consultant

input ComplexInputType {
value: String
deeper: ComplexInputType
deeperArray: [ComplexInputType]
value: String
valueArray: [String]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[
"type Query {\n contract(contractId: ID!): Contract\n contracts(customerId: ID!): [Contract!]\n}\n\ninterface Contract {\n id: ID!\n}\n\ntype LifeInsuranceContract implements Contract {\n id: ID!\n premium: Float\n}\n\ntype SomeOtherContract implements Contract {\n id: ID!\n expiryDate: DateTime\n}",
"type Query {\n customer(id: ID!): Customer\n consultant(id: ID!): Consultant\n customerOrConsultant(id: ID!): CustomerOrConsultant\n}\n\ntype Customer {\n id: ID!\n name: String!\n consultant: Consultant\n complexArg(arg: ComplexInputType): String\n}\n\ntype Consultant {\n id: ID!\n name: String!\n}\n\nunion CustomerOrConsultant = Customer | Consultant\n\ninput ComplexInputType {\n value: String\n deeper: ComplexInputType\n}"
"type Query {\n customer(id: ID!): Customer\n consultant(id: ID!): Consultant\n customerOrConsultant(id: ID!): CustomerOrConsultant\n}\n\ntype Customer {\n id: ID!\n name: String!\n consultant: Consultant\n complexArg(arg: ComplexInputType): String\n}\n\ntype Consultant {\n id: ID!\n name: String!\n}\n\nunion CustomerOrConsultant = Customer | Consultant\n\ninput ComplexInputType {\n deeper: ComplexInputType\n deeperArray: [ComplexInputType]\n value: String\n valueArray: [String]\n}"
]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[
"type Query {\n contract(contractId: ID!): Contract\n contracts(customerId: ID!): [Contract!]\n}\n\ninterface Contract {\n id: ID!\n}\n\ntype LifeInsuranceContract implements Contract {\n id: ID!\n premium: Float\n}\n\ntype SomeOtherContract implements Contract {\n id: ID!\n expiryDate: DateTime\n}",
"type Query {\n customer(id: ID!): Customer\n consultant(id: ID!): Consultant\n customerOrConsultant(id: ID!): CustomerOrConsultant\n}\n\ntype Customer {\n id: ID!\n name: String!\n consultant: Consultant\n complexArg(arg: ComplexInputType): String\n}\n\ntype Consultant {\n id: ID!\n name: String!\n}\n\nunion CustomerOrConsultant = Customer | Consultant\n\ninput ComplexInputType {\n value: String\n deeper: ComplexInputType\n}"
"type Query {\n customer(id: ID!): Customer\n consultant(id: ID!): Consultant\n customerOrConsultant(id: ID!): CustomerOrConsultant\n}\n\ntype Customer {\n id: ID!\n name: String!\n consultant: Consultant\n complexArg(arg: ComplexInputType): String\n}\n\ntype Consultant {\n id: ID!\n name: String!\n}\n\nunion CustomerOrConsultant = Customer | Consultant\n\ninput ComplexInputType {\n deeper: ComplexInputType\n deeperArray: [ComplexInputType]\n value: String\n valueArray: [String]\n}"
]
Original file line number Diff line number Diff line change
@@ -35,6 +35,8 @@ type Consultant @source(name: "Consultant", schema: "customer") {
union CustomerOrConsultant @source(name: "CustomerOrConsultant", schema: "customer") = Customer | Consultant

input ComplexInputType @source(name: "ComplexInputType", schema: "customer") {
value: String
deeper: ComplexInputType
deeperArray: [ComplexInputType]
value: String
valueArray: [String]
}
Original file line number Diff line number Diff line change
@@ -35,6 +35,8 @@ type Consultant @source(name: "Consultant", schema: "customer") {
union CustomerOrConsultant @source(name: "CustomerOrConsultant", schema: "customer") = Customer | Consultant

input ComplexInputType @source(name: "ComplexInputType", schema: "customer") {
value: String
deeper: ComplexInputType
deeperArray: [ComplexInputType]
value: String
valueArray: [String]
}