Skip to content

Commit

Permalink
chore: update products subgraph
Browse files Browse the repository at this point in the history
  • Loading branch information
JivusAyrus committed Sep 9, 2024
1 parent a0cb331 commit 37b65bf
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 16 deletions.
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

0 comments on commit 37b65bf

Please sign in to comment.