Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const val LINK_SPEC_URL_PREFIX = "$APOLLO_SPEC_URL/$LINK_SPEC"
const val LINK_SPEC_LATEST_URL = "$LINK_SPEC_URL_PREFIX/v$LINK_SPEC_LATEST_VERSION"

const val FEDERATION_SPEC = "federation"
const val FEDERATION_SPEC_LATEST_VERSION = "2.14"
const val FEDERATION_SPEC_LATEST_VERSION = "2.13"
const val FEDERATION_SPEC_URL_PREFIX = "$APOLLO_SPEC_URL/$FEDERATION_SPEC"
const val FEDERATION_SPEC_LATEST_URL = "$FEDERATION_SPEC_URL_PREFIX/v$FEDERATION_SPEC_LATEST_VERSION"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class FederatedSchemaGeneratorTest {
fun `verify can generate federated schema`() {
val expectedSchema =
"""
schema @link(import : ["@external", "@key", "@provides", "@requires", "FieldSet"], url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(import : ["@external", "@key", "@provides", "@requires", "FieldSet"], url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down Expand Up @@ -164,7 +164,7 @@ class FederatedSchemaGeneratorTest {
fun `verify generator does not add federation queries for non-federated schemas`() {
val expectedSchema =
"""
schema @link(url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down Expand Up @@ -226,7 +226,7 @@ class FederatedSchemaGeneratorTest {
fun `verify a schema with self nested query still works`() {
val expectedSchema =
"""
schema @link(url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CacheTagDirectiveTest {
val expectedSchema =
// language=GraphQL
"""
schema @link(import : ["@cacheTag"], url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(import : ["@cacheTag"], url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down Expand Up @@ -95,7 +95,7 @@ class CacheTagDirectiveTest {
this.linkSpecs[FEDERATION_SPEC] = FederatedSchemaGeneratorHooks.LinkSpec(
namespace = FEDERATION_SPEC,
imports = mapOf("cacheTag" to "cacheTag"),
url = "$FEDERATION_SPEC_URL_PREFIX/v2.14"
url = "$FEDERATION_SPEC_URL_PREFIX/v2.13"
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class ComposeDirectiveTest {
fun `verify we can generate valid schema with @composeDirective`() {
val expectedSchema =
"""
schema @composeDirective(name : "custom") @link(as : "myspec", import : ["@custom"], url : "https://www.myspecs.dev/myspec/v1.0") @link(import : ["@composeDirective", "@key", "FieldSet"], url : "https://specs.apollo.dev/federation/v2.14"){
schema @composeDirective(name : "custom") @link(as : "myspec", import : ["@custom"], url : "https://www.myspecs.dev/myspec/v1.0") @link(import : ["@composeDirective", "@key", "FieldSet"], url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ContactDirectiveTest {
fun `verify we can import federation spec using custom @link`() {
val expectedSchema =
"""
schema @contact(description : "Send emails to foo@myteamname.com", name : "My Team Name", url : "https://myteam.slack.com/room") @link(url : "https://specs.apollo.dev/federation/v2.14"){
schema @contact(description : "Send emails to foo@myteamname.com", name : "My Team Name", url : "https://myteam.slack.com/room") @link(url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ContextDirectiveTest {
val expectedSchema =
// language=GraphQL
"""
schema @link(import : ["@key", "@context"], url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(import : ["@key", "@context"], url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down Expand Up @@ -114,7 +114,7 @@ class ContextDirectiveTest {
this.linkSpecs[FEDERATION_SPEC] = FederatedSchemaGeneratorHooks.LinkSpec(
namespace = FEDERATION_SPEC,
imports = mapOf("key" to "key", "context" to "context"),
url = "$FEDERATION_SPEC_URL_PREFIX/v2.14"
url = "$FEDERATION_SPEC_URL_PREFIX/v2.13"
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CostDirectiveTest {
val expectedSchema =
// language=GraphQL
"""
schema @link(import : ["@cost"], url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(import : ["@cost"], url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down Expand Up @@ -95,7 +95,7 @@ class CostDirectiveTest {
this.linkSpecs[FEDERATION_SPEC] = FederatedSchemaGeneratorHooks.LinkSpec(
namespace = FEDERATION_SPEC,
imports = mapOf("cost" to "cost"),
url = "$FEDERATION_SPEC_URL_PREFIX/v2.14"
url = "$FEDERATION_SPEC_URL_PREFIX/v2.13"
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class FromContextDirectiveTest {
// language=GraphQL
val expectedSchema =
$$"""
schema @link(import : ["@key", "@context", "@fromContext", "ContextFieldValue"], url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(import : ["@key", "@context", "@fromContext", "ContextFieldValue"], url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down Expand Up @@ -126,7 +126,7 @@ class FromContextDirectiveTest {
"fromContext" to "fromContext",
"ContextFieldValue" to "ContextFieldValue"
),
url = "$FEDERATION_SPEC_URL_PREFIX/v2.14"
url = "$FEDERATION_SPEC_URL_PREFIX/v2.13"
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class LinkDirectiveTest {
fun `verify we can import federation spec using custom @link`() {
val expectedSchema =
"""
schema @link(as : "fed", import : [{name : "@key", as : "@myKey"}], url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(as : "fed", import : [{name : "@key", as : "@myKey"}], url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ListSizeDirectiveTest {
val expectedSchema =
// language=GraphQL
"""
schema @link(import : ["@listSize"], url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(import : ["@listSize"], url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down Expand Up @@ -96,7 +96,7 @@ class ListSizeDirectiveTest {
this.linkSpecs[FEDERATION_SPEC] = FederatedSchemaGeneratorHooks.LinkSpec(
namespace = FEDERATION_SPEC,
imports = mapOf("listSize" to "listSize"),
url = "$FEDERATION_SPEC_URL_PREFIX/v2.14"
url = "$FEDERATION_SPEC_URL_PREFIX/v2.13"
)
}
)
Expand Down Expand Up @@ -141,7 +141,7 @@ class ListSizeDirectiveTest {
this.linkSpecs[FEDERATION_SPEC] = FederatedSchemaGeneratorHooks.LinkSpec(
namespace = FEDERATION_SPEC,
imports = mapOf("listSize" to "listSize"),
url = "$FEDERATION_SPEC_URL_PREFIX/v2.14"
url = "$FEDERATION_SPEC_URL_PREFIX/v2.13"
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ import kotlin.test.assertNotNull
class OverrideDirectiveTest {

@Test
fun `verify override directive definition for fed 2_15`() {
fun `verify override directive definition for fed 2_13`() {
val expectedSchema =
"""
schema @link(import : ["@override"], url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(import : ["@override"], url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class PolicyDirectiveTest {
fun `verify we can import federation spec using custom @link`() {
val expectedSchema =
"""
schema @link(url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class RequiresScopesDirectiveTest {
fun `verify we can import federation spec using custom @link`() {
val expectedSchema =
"""
schema @link(url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import kotlin.test.assertNotNull

const val BASE_SERVICE_SDL =
"""
schema @link(url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down Expand Up @@ -70,7 +70,7 @@ scalar link__Import

const val FEDERATED_SERVICE_SDL_V2 =
"""
schema @link(import : ["@external", "@key", "@provides", "@requires", "FieldSet"], url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(import : ["@external", "@key", "@provides", "@requires", "FieldSet"], url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
schema @link(url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
schema @link(url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class GenerateSDLMojoTest {
assertTrue(schemaFile.exists(), "schema file was generated")

val expectedSchema = """
schema @link(url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class GenerateSDLMojoTest {
assertTrue(schemaFile.exists(), "schema file was generated")

val expectedSchema = """
schema @link(url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class GenerateCustomSDLTest {
@Test
fun `verify we can generate SDL using custom hooks provider`() {
val expectedSchema = """
schema @link(url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ toFederatedSchema(
will generate

```graphql
schema @link(import : ["@key", "FieldSet"], url : "https://specs.apollo.dev/federation/v2.14"){
schema @link(import : ["@key", "FieldSet"], url : "https://specs.apollo.dev/federation/v2.13"){
query: Query
}

Expand Down
Loading