Skip to content

Commit

Permalink
Update remaining snapshots for tests that now have directives preserved
Browse files Browse the repository at this point in the history
  • Loading branch information
tninesling committed Aug 23, 2024
1 parent bec6cc0 commit ac6c6d2
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
source: router-bridge/src/planner.rs
expression: schema
---
schema @link(url: "https://specs.apollo.dev/link/v1.0") @link(url: "https://specs.apollo.dev/federation/v2.9", import: ["@key", "@requires", "@provides", "@external", "@tag", "@extends", "@shareable", "@inaccessible", "@override", "@composeDirective", "@interfaceObject"]) {
query: Query
}

directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA

directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE
Expand Down Expand Up @@ -55,7 +59,6 @@ enum link__Purpose {
`SECURITY` features provide metadata necessary to securely resolve fields.
"""
SECURITY

"""
`EXECUTION` features provide metadata necessary for operation execution.
"""
Expand All @@ -72,31 +75,31 @@ scalar federation__Policy

scalar federation__ContextFieldValue

type Book implements Product {
type Book implements Product @key(fields: "isbn") {
isbn: String!
title: String
year: Int
similarBooks: [Book]!
metadata: [MetadataOrError]
upc: String!
sku: String!
name: String
price: String
details: ProductDetails
inStock: Boolean
upc: String! @external
sku: String! @external
name: String @external
price: String @external
details: ProductDetails @external
inStock: Boolean @external
}

type Error {
code: Int
message: String
code: Int @shareable
message: String @shareable
}

type KeyValue {
key: String!
value: String!
key: String! @shareable
value: String! @shareable
}

type Library {
type Library @key(fields: "id") {
id: ID!
name: String
}
Expand All @@ -117,13 +120,13 @@ interface ProductDetails {
}

type ProductDetailsBook implements ProductDetails {
country: String
pages: Int
country: String @shareable
pages: Int @shareable
}

type ProductDetailsFurniture implements ProductDetails {
country: String
color: String
country: String @shareable
color: String @shareable
}

type Query {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
source: router-bridge/src/planner.rs
expression: schema
---
schema @link(url: "https://specs.apollo.dev/link/v1.0") @link(url: "https://specs.apollo.dev/federation/v2.9", import: ["@key", "@requires", "@provides", "@external", "@tag", "@extends", "@shareable", "@inaccessible", "@override", "@composeDirective", "@interfaceObject"]) {
query: Query
}

directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA

directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE
Expand Down Expand Up @@ -55,7 +59,6 @@ enum link__Purpose {
`SECURITY` features provide metadata necessary to securely resolve fields.
"""
SECURITY

"""
`EXECUTION` features provide metadata necessary for operation execution.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
source: router-bridge/src/planner.rs
expression: schema
---
schema @link(url: "https://specs.apollo.dev/link/v1.0") @link(url: "https://specs.apollo.dev/federation/v2.9", import: ["@key", "@requires", "@provides", "@external", "@tag", "@extends", "@shareable", "@inaccessible", "@override", "@composeDirective", "@interfaceObject"]) {
query: Query
}

directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA

directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE
Expand Down Expand Up @@ -55,7 +59,6 @@ enum link__Purpose {
`SECURITY` features provide metadata necessary to securely resolve fields.
"""
SECURITY

"""
`EXECUTION` features provide metadata necessary for operation execution.
"""
Expand All @@ -72,25 +75,25 @@ scalar federation__Policy

scalar federation__ContextFieldValue

type Book implements Product {
type Book implements Product @key(fields: "isbn") {
inStock: Boolean
isCheckedOut: Boolean
isbn: String!
upc: String!
sku: String!
name: String
price: String
details: ProductDetails
upc: String! @external
sku: String! @external
name: String @external
price: String @external
details: ProductDetails @external
}

type Furniture implements Product {
type Furniture implements Product @key(fields: "sku") {
inStock: Boolean
isHeavy: Boolean
sku: String!
upc: String!
name: String
price: String
details: ProductDetails
upc: String! @external
name: String @external
price: String @external
details: ProductDetails @external
}

interface Product {
Expand All @@ -107,25 +110,25 @@ interface ProductDetails {
}

type ProductDetailsBook implements ProductDetails {
country: String
pages: Int
country: String @shareable
pages: Int @shareable
}

type ProductDetailsFurniture implements ProductDetails {
country: String
color: String
country: String @shareable
color: String @shareable
}

type User {
goodDescription: Boolean
type User @key(fields: "id") {
goodDescription: Boolean @requires(fields: "metadata{description}")
id: ID!
metadata: [UserMetadata]
metadata: [UserMetadata] @external
}

type UserMetadata {
name: String
address: String
description: String
name: String @shareable
address: String @shareable
description: String @shareable
}

scalar _Any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
source: router-bridge/src/planner.rs
expression: schema
---
schema @link(url: "https://specs.apollo.dev/link/v1.0") @link(url: "https://specs.apollo.dev/federation/v2.9", import: ["@key", "@requires", "@provides", "@external", "@tag", "@extends", "@shareable", "@inaccessible", "@override", "@composeDirective", "@interfaceObject"]) {
query: Query
}

directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA

directive @key(fields: federation__FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE
Expand Down Expand Up @@ -55,7 +59,6 @@ enum link__Purpose {
`SECURITY` features provide metadata necessary to securely resolve fields.
"""
SECURITY

"""
`EXECUTION` features provide metadata necessary for operation execution.
"""
Expand All @@ -76,50 +79,50 @@ type Amazon {
referrer: String
}

type Book implements Product {
type Book implements Product @key(fields: "isbn") {
upc: String!
sku: String!
name(delimeter: String = " "): String
name(delimeter: String = " "): String @requires(fields: "title year")
price: String
details: ProductDetailsBook
isbn: String!
title: String
year: Int
inStock: Boolean
title: String @external
year: Int @external
inStock: Boolean @external
}

union Brand = Ikea | Amazon

type Car implements Vehicle {
type Car implements Vehicle @key(fields: "id") {
id: String!
description: String
price: String
retailPrice: String
retailPrice: String @external
}

type Error {
code: Int
message: String
code: Int @shareable
message: String @shareable
}

type Furniture implements Product {
type Furniture implements Product @key(fields: "upc") @key(fields: "sku") {
upc: String!
sku: String!
name: String
price: String
brand: Brand
metadata: [MetadataOrError]
details: ProductDetailsFurniture
inStock: Boolean
inStock: Boolean @external
}

type Ikea {
asile: Int
}

type KeyValue {
key: String!
value: String!
key: String! @shareable
value: String! @shareable
}

union MetadataOrError = KeyValue | Error
Expand All @@ -138,13 +141,13 @@ interface ProductDetails {
}

type ProductDetailsBook implements ProductDetails {
country: String
pages: Int
country: String @shareable
pages: Int @shareable
}

type ProductDetailsFurniture implements ProductDetails {
country: String
color: String
country: String @shareable
color: String @shareable
}

type Query {
Expand All @@ -158,17 +161,17 @@ type Query {

union Thing = Car | Ikea

type User {
type User @key(fields: "id") {
vehicle: Vehicle
thing: Thing
id: ID!
}

type Van implements Vehicle {
type Van implements Vehicle @key(fields: "id") {
id: String!
description: String
price: String
retailPrice: String
retailPrice: String @external
}

interface Vehicle {
Expand Down
Loading

0 comments on commit ac6c6d2

Please sign in to comment.