From 69a73ce5b4acb9330d0e4149302a28280d27017d Mon Sep 17 00:00:00 2001 From: Vincent Date: Fri, 5 Aug 2022 20:32:21 +1200 Subject: [PATCH 1/3] Fix: Fixed Drone not adding variables and operationName --- Sources/Pioneer/WebSocket/Probe/Drone/Drone.swift | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Sources/Pioneer/WebSocket/Probe/Drone/Drone.swift b/Sources/Pioneer/WebSocket/Probe/Drone/Drone.swift index 6c6588b..e88f71f 100644 --- a/Sources/Pioneer/WebSocket/Probe/Drone/Drone.swift +++ b/Sources/Pioneer/WebSocket/Probe/Drone/Drone.swift @@ -136,7 +136,15 @@ extension Pioneer { /// Execute long lived GraphQL Operation as a subscription private func subscribeOperation(for gql: GraphQLRequest, with ctx: Context, using eventLoop: EventLoopGroup) async throws -> SubscriptionResult { - try await subscribeGraphQL(schema: schema, request: gql.query, resolver: resolver, context: ctx, eventLoopGroup: eventLoop) + try await subscribeGraphQL( + schema: schema, + request: gql.query, + resolver: resolver, + context: ctx, + eventLoopGroup: eventLoop, + variables: gql.variables, + operationName: gql.operationName + ) } deinit { From cd6c53ffc6db421d14f6d44f8f9582107fd22561 Mon Sep 17 00:00:00 2001 From: Vincent Date: Fri, 5 Aug 2022 20:32:35 +1200 Subject: [PATCH 2/3] Fix: General improvement to how operation is executed --- Sources/Pioneer/WebSocket/Probe/Probe.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Pioneer/WebSocket/Probe/Probe.swift b/Sources/Pioneer/WebSocket/Probe/Probe.swift index 8356afe..2cc1d45 100644 --- a/Sources/Pioneer/WebSocket/Probe/Probe.swift +++ b/Sources/Pioneer/WebSocket/Probe/Probe.swift @@ -127,7 +127,7 @@ extension Pioneer { resolver: self.resolver, context: ctx, eventLoopGroup: eventLoop, - variables: gql.variables ?? [:], + variables: gql.variables, operationName: gql.operationName ) } From b18bc784ff61f02b313753f1f6043959f4c08f65 Mon Sep 17 00:00:00 2001 From: Vincent Date: Fri, 5 Aug 2022 20:33:43 +1200 Subject: [PATCH 3/3] Fix: Fixed version --- Documentation/README.md | 2 +- Documentation/guides/getting-started/setup.md | 2 +- README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/README.md b/Documentation/README.md index f576f05..0ee780f 100644 --- a/Documentation/README.md +++ b/Documentation/README.md @@ -26,7 +26,7 @@ You can add Pioneer into any existing Vapor application with any GraphQL schema Add this line to add Pioneer as one of your dependencies. ```swift -.package(url: "https://github.com/d-exclaimation/pioneer", from: "0.9.3") +.package(url: "https://github.com/d-exclaimation/pioneer", from: "0.9.4") ``` Go to the `main.swift` or any Swift file where you apply your Vapor routing like your `routes.swift` file. diff --git a/Documentation/guides/getting-started/setup.md b/Documentation/guides/getting-started/setup.md index be12d3b..2d98c4f 100644 --- a/Documentation/guides/getting-started/setup.md +++ b/Documentation/guides/getting-started/setup.md @@ -36,7 +36,7 @@ let package = Package( dependencies: [ .package(url: "https://github.com/GraphQLSwift/Graphiti.git", from: "1.0.0"), .package(url: "https://github.com/vapor/vapor.git", from: "4.61.1"), - .package(url: "https://github.com/d-exclaimation/pioneer", from: "0.9.3") + .package(url: "https://github.com/d-exclaimation/pioneer", from: "0.9.4") ], targets: [ .target( diff --git a/README.md b/README.md index b08c474..6f9078c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Pioneer is an open-source Swift GraphQL server for [Vapor](https://github.com/va ## Setup ```swift -.package(url: "https://github.com/d-exclaimation/pioneer", from: "0.9.3") +.package(url: "https://github.com/d-exclaimation/pioneer", from: "0.9.4") ``` ## Swift for GraphQL