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 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 { 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 ) }