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

chore: update products subgraph #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
30 changes: 20 additions & 10 deletions demos/go/pkg/subgraphs/products/subgraph/employees.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,26 @@ var employees = []*model.Employee{
model.ProductNameMarketing,
model.ProductNameSdk,
},
Notes: strPtr("Jens notes resolved by products"),
ProductCount: 5,
Notes: strPtr("Jens notes resolved by products"),
},
{
ID: 2,
Products: []model.ProductName{
model.ProductNameCosmo,
model.ProductNameSdk,
},
Notes: strPtr("Dustin notes resolved by products"),
ProductCount: 2,
Notes: strPtr("Dustin notes resolved by products"),
},
{
ID: 3,
Products: []model.ProductName{
model.ProductNameConsultancy,
model.ProductNameMarketing,
},
Notes: strPtr("Stefan notes resolved by products"),
ProductCount: 2,
Notes: strPtr("Stefan notes resolved by products"),
},
{
ID: 4,
Expand All @@ -41,31 +44,35 @@ var employees = []*model.Employee{
model.ProductNameHumanResources,
model.ProductNameMarketing,
},
Notes: strPtr("Björn notes resolved by products"),
ProductCount: 3,
Notes: strPtr("Björn notes resolved by products"),
},
{
ID: 5,
Products: []model.ProductName{
model.ProductNameEngine,
model.ProductNameSdk,
},
Notes: strPtr("Sergiy notes resolved by products"),
ProductCount: 2,
Notes: strPtr("Sergiy notes resolved by products"),
},
{
ID: 7,
Products: []model.ProductName{
model.ProductNameCosmo,
model.ProductNameSdk,
},
Notes: strPtr("Suvij notes resolved by products"),
ProductCount: 2,
Notes: strPtr("Suvij notes resolved by products"),
},
{
ID: 8,
Products: []model.ProductName{
model.ProductNameCosmo,
model.ProductNameSdk,
},
Notes: strPtr("Nithin notes resolved by products"),
ProductCount: 2,
Notes: strPtr("Nithin notes resolved by products"),
},
{
ID: 10,
Expand All @@ -74,14 +81,16 @@ var employees = []*model.Employee{
model.ProductNameCosmo,
model.ProductNameSdk,
},
Notes: strPtr("Eelco notes resolved by products"),
ProductCount: 3,
Notes: strPtr("Eelco notes resolved by products"),
},
{
ID: 11,
Products: []model.ProductName{
model.ProductNameFinance,
},
Notes: strPtr("Alexandra notes resolved by products"),
ProductCount: 1,
Notes: strPtr("Alexandra notes resolved by products"),
},
{
ID: 12,
Expand All @@ -91,6 +100,7 @@ var employees = []*model.Employee{
model.ProductNameEngine,
model.ProductNameSdk,
},
Notes: strPtr("David notes resolved by products"),
ProductCount: 4,
Notes: strPtr("David notes resolved by products"),
},
}
66 changes: 63 additions & 3 deletions demos/go/pkg/subgraphs/products/subgraph/generated/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions demos/go/pkg/subgraphs/products/subgraph/model/models_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions demos/go/pkg/subgraphs/products/subgraph/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ type Employee @key(fields: "id") {
id: Int!
products: [ProductName!]!
notes: String @override(from: "employees")
productCount: Int!
}

union Products = Consultancy | Cosmo | Documentation
Expand Down