-
Notifications
You must be signed in to change notification settings - Fork 55
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
Update subgraph implementations with latest schema changes #166
Labels
type: schema change
Change introduces change to the subgraph schemas
Comments
Updated extend schema
@link(
url: "https://specs.apollo.dev/federation/v2.0",
import: [
"@extends",
"@external",
"@key",
"@inaccessible",
"@override",
"@provides",
"@requires",
"@shareable",
"@tag"
]
)
type Product
@key(fields: "id")
@key(fields: "sku package")
@key(fields: "sku variation { id }") {
id: ID!
sku: String
package: String
variation: ProductVariation
dimensions: ProductDimension
createdBy: User @provides(fields: "totalProductsCreated")
notes: String @tag(name: "internal")
research: [ProductResearch!]!
}
type DeprecatedProduct @key(fields: "sku package") {
sku: String!
package: String!
reason: String
createdBy: User
}
type ProductVariation {
id: ID!
}
type ProductResearch @key(fields: "study { caseNumber }") {
study: CaseStudy!
outcome: String
}
type CaseStudy {
caseNumber: ID!
description: String
}
type ProductDimension @shareable {
size: String
weight: Float
unit: String @inaccessible
}
extend type Query {
product(id: ID!): Product
deprecatedProduct(sku: String!, package: String!): DeprecatedProduct @deprecated(reason: "Use product query instead")
}
extend type User @key(fields: "email") {
averageProductsCreatedPerYear: Int @requires(fields: "totalProductsCreated yearsOfEmployment")
email: ID! @external
name: String @override(from: "users")
totalProductsCreated: Int @external
yearsOfEmployment: Int! @external
} Test data: const dimension = {
size: "small",
weight: 1,
unit: "kg"
};
const user = {
averageProductsCreatedPerYear: if (totalProductsCreated) {
Math.round(totalProductsCreated / yearsOfEmployment)
} else {
null
},
email: "support@apollographql.com",
name: "Jane Smith",
totalProductsCreated: 1337,
yearsOfEmployment: 10
};
const deprecatedProduct = {
sku: "apollo-federation-v1",
package: "@apollo/federation-v1",
reason: "Migrate to Federation V2",
createdBy: user
};
const productsResearch = [
{
study: {
caseNumber: "1234",
description: "Federation Study"
},
outcome: null
},
{
study: {
caseNumber: "1235",
description: "Studio Study"
},
outcome: null
},
];
const products = [
{
id: "apollo-federation",
sku: "federation",
package: "@apollo/federation",
variation: {
id: "OSS"
},
dimensions: dimension,
research: [productsResearch[0]]
createdBy: user,
notes: null
},
{
id: "apollo-studio",
sku: "studio",
package: "",
variation: {
id: "platform"
},
dimensions: dimension,
research: [productsResearch[1]]
createdBy: user,
notes: null
},
]; |
24 tasks
dariuszkuc
added a commit
to dariuszkuc/apollo-federation-subgraph-compatibility
that referenced
this issue
Aug 11, 2022
Update `product` schema to allow for more granular testing of `@key` directive functionality. Related issue: * apollographql#166
dariuszkuc
added a commit
that referenced
this issue
Aug 11, 2022
Update `product` schema to allow for more granular testing of `@key` directive functionality. Related issue: * #166
New test requires |
Also looks like the ordering of the type Product @key(fields: "sku variation { id }") @key(fields: "sku package") @key(fields: "id") but the test is looking for type Product @key(fields: "id") @key(fields: "sku package") @key(fields: "sku variation { id }") and so it fails even though these are syntactically equivalent |
dariuszkuc
added a commit
to dariuszkuc/apollo-federation-subgraph-compatibility
that referenced
this issue
Aug 12, 2022
dariuszkuc
pushed a commit
that referenced
this issue
Aug 12, 2022
dariuszkuc
added a commit
that referenced
this issue
Aug 12, 2022
dariuszkuc
added a commit
that referenced
this issue
Aug 12, 2022
dariuszkuc
added a commit
that referenced
this issue
Aug 12, 2022
dariuszkuc
pushed a commit
that referenced
this issue
Aug 15, 2022
This was referenced Aug 15, 2022
This was referenced Aug 15, 2022
dariuszkuc
pushed a commit
that referenced
this issue
Aug 23, 2022
10 tasks
hwillson
added a commit
that referenced
this issue
Sep 17, 2022
dariuszkuc
pushed a commit
that referenced
this issue
Sep 19, 2022
dariuszkuc
added a commit
that referenced
this issue
Feb 8, 2023
dariuszkuc
added a commit
to dariuszkuc/apollo-federation-subgraph-compatibility
that referenced
this issue
Feb 10, 2023
See apollographql#166 for details. Resolves apollographql#190
dariuszkuc
added a commit
to dariuszkuc/apollo-federation-subgraph-compatibility
that referenced
this issue
Feb 10, 2023
See apollographql#166 for details. Resolves apollographql#190
dariuszkuc
added a commit
to dariuszkuc/apollo-federation-subgraph-compatibility
that referenced
this issue
Feb 10, 2023
See apollographql#166 for details. Resolves apollographql#190
dariuszkuc
added a commit
to dariuszkuc/apollo-federation-subgraph-compatibility
that referenced
this issue
Mar 3, 2023
See apollographql#166 for details. Resolves apollographql#190
dariuszkuc
added a commit
to dariuszkuc/apollo-federation-subgraph-compatibility
that referenced
this issue
Mar 3, 2023
See apollographql#166 for details. Resolves apollographql#190
dariuszkuc
added a commit
that referenced
this issue
Mar 12, 2023
dariuszkuc
added a commit
to dariuszkuc/apollo-federation-subgraph-compatibility
that referenced
this issue
Mar 23, 2023
See apollographql#166 for details. Resolves apollographql#190
dariuszkuc
added a commit
that referenced
this issue
Mar 27, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue to track which subgraph implementations should be updated due to the recent schema changes introduced for better
@requires
(#150) and@key
(#165) tests.Subgraph implementations:
Related issues:
The text was updated successfully, but these errors were encountered: