From e2d5f82e5fa9c61ba6425fd3aad926b46373a9ae Mon Sep 17 00:00:00 2001 From: Mike Pollard Date: Mon, 24 Jul 2017 11:24:26 +0100 Subject: [PATCH 01/10] Add support for adding basic input types to the schema via an InputObjectTypeBuilder --- Sources/Graphiti/Schema/Schema.swift | 25 +++++++ Sources/Graphiti/Types/InputObjectType.swift | 24 +++++++ .../HelloWorldTests/HelloWorldTests.swift | 66 +++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 Sources/Graphiti/Types/InputObjectType.swift diff --git a/Sources/Graphiti/Schema/Schema.swift b/Sources/Graphiti/Schema/Schema.swift index c3406ef2..16e063ce 100644 --- a/Sources/Graphiti/Schema/Schema.swift +++ b/Sources/Graphiti/Schema/Schema.swift @@ -91,6 +91,31 @@ public final class SchemaBuilder { map(Type.self, to: objectType) } + public func inputObject( + type: Type.Type, + build: (InputObjectTypeBuilder) throws -> Void + ) throws { + let name = fixName(String(describing: Type.self)) + try inputObject(name: name, type: type, build: build) + } + + public func inputObject( + name: String, + type: Type.Type, + build: (InputObjectTypeBuilder) throws -> Void + ) throws { + let builder = InputObjectTypeBuilder(schema: self) + try build(builder) + + let inputObjectType = try GraphQLInputObjectType( + name: name, + description: builder.description, + fields: builder.fields + ) + + map(Type.self, to: inputObjectType) + } + public func interface( type: Type.Type, build: (InterfaceTypeBuilder) throws -> Void diff --git a/Sources/Graphiti/Types/InputObjectType.swift b/Sources/Graphiti/Types/InputObjectType.swift new file mode 100644 index 00000000..5f613d2e --- /dev/null +++ b/Sources/Graphiti/Types/InputObjectType.swift @@ -0,0 +1,24 @@ +import GraphQL + +public final class InputObjectTypeBuilder { + var schema: SchemaBuilder + + init(schema: SchemaBuilder) { + self.schema = schema + } + + public var description: String? = nil + + var fields: InputObjectConfigFieldMap = [:] + + /// Export all properties using reflection + /// + /// - Throws: Reflection Errors + public func exportFields() throws { + for property in try properties(Type.self) { + let field = InputObjectField(type: try schema.getInputType(from: property.type, field: property.key)) + fields[property.key] = field + } + } +} + diff --git a/Tests/GraphitiTests/HelloWorldTests/HelloWorldTests.swift b/Tests/GraphitiTests/HelloWorldTests/HelloWorldTests.swift index 4ce89cae..76355a38 100644 --- a/Tests/GraphitiTests/HelloWorldTests/HelloWorldTests.swift +++ b/Tests/GraphitiTests/HelloWorldTests/HelloWorldTests.swift @@ -101,6 +101,72 @@ class HelloWorldTests : XCTestCase { result = try schema.execute(request: query) XCTAssertEqual(result, expected) } + + func testInput() throws { + + struct Foo : OutputType { + let id: String + let name : String? + + static func fromInput(_ input: FooInput) -> Foo { + return Foo(id: input.id, name: input.name) + } + } + + struct FooInput : InputType { + let id: String + let name : String? + } + + let schema = try Schema { schema in + + try schema.object(type: Foo.self) { builder in + + try builder.exportFields() + } + + try schema.query { query in + + try query.field(name: "foo", type: (Foo?).self) { (_,_,_,_) in + + return Foo(id: "123", name: "bar") + } + } + + try schema.inputObject(type: FooInput.self) { builder in + + try builder.exportFields() + } + + struct AddFooArguments : Arguments { + + let input: FooInput + } + + try schema.mutation { mutation in + + try mutation.field(name: "addFoo", type: Foo.self) { (_, arguments: AddFooArguments, _, _) in + + debugPrint(arguments) + return Foo.fromInput(arguments.input) + } + } + + } + + let mutation = "mutation addFoo($input: FooInput!) { addFoo(input:$input) { id, name } }" + let variables: [String:Map] = ["input" : [ "id" : "123", "name" : "bob" ]] + let expected: Map = ["data": ["addFoo" : [ "id" : "123", "name" : "bob" ]]] + do { + let result = try schema.execute(request: mutation, variables: variables) + XCTAssertEqual(result, expected) + debugPrint(result) + } + catch { + debugPrint(error) + } + + } } extension HelloWorldTests { From 97c08f1a57c51176de5eb01187515012e2bafd9c Mon Sep 17 00:00:00 2001 From: Mike Pollard Date: Tue, 25 Jul 2017 14:35:38 +0100 Subject: [PATCH 02/10] Update .travis.yml based on GraphQLSwift/GraphQL setup --- .travis.yml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index f745875f..a92eae9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,20 @@ notifications: slack: zewo:VjyVCCQvTOw9yrbzQysZezD1 -os: - - linux - - osx language: generic -sudo: required -dist: trusty -osx_image: xcode8 -install: - - eval "$(curl -sL https://raw.githubusercontent.com/Zewo/Zewo/master/Scripts/Travis/install.sh)" +matrix: + include: + - os: osx + env: JOB=SwiftPM_OSX + osx_image: xcode8.3 + - os: linux + env: JOB=SwiftPM_linux + dist: trusty + sudo: required + install: + - travis_retry eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)" script: - - bash <(curl -s https://raw.githubusercontent.com/Zewo/Zewo/master/Scripts/Travis/build-test.sh) Graphiti -#after_success: - - bash <(curl -s https://raw.githubusercontent.com/Zewo/Zewo/master/Scripts/Travis/report-coverage.sh) + - swift build -c release + - swift build + - swift test + - eval "$(curl -sL https://raw.githubusercontent.com/lgaches/swifttravisci/master/codecov)" + From 97a9e9b4c33de59bc7b86ef181a6fcdafd13f8d9 Mon Sep 17 00:00:00 2001 From: Mike Pollard Date: Thu, 30 Nov 2017 16:42:40 +0000 Subject: [PATCH 03/10] Extend InputObjectTypeBuilder with addFieldMap and make SchemeBuilder.getInputType public for convenience --- Sources/Graphiti/Schema/Schema.swift | 4 ++-- Sources/Graphiti/Types/InputObjectType.swift | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Sources/Graphiti/Schema/Schema.swift b/Sources/Graphiti/Schema/Schema.swift index 16e063ce..0f9fa0eb 100644 --- a/Sources/Graphiti/Schema/Schema.swift +++ b/Sources/Graphiti/Schema/Schema.swift @@ -261,7 +261,7 @@ public final class SchemaBuilder { } } -extension SchemaBuilder { +public extension SchemaBuilder { func map(_ type: Any.Type, to graphQLType: GraphQLType) { guard !(type is Void.Type) else { return @@ -339,7 +339,7 @@ extension SchemaBuilder { return outputType } - func getInputType(from type: Any.Type, field: String) throws -> GraphQLInputType { + public func getInputType(from type: Any.Type, field: String) throws -> GraphQLInputType { guard let graphQLType = getGraphQLType(from: type) else { throw GraphQLError( message: diff --git a/Sources/Graphiti/Types/InputObjectType.swift b/Sources/Graphiti/Types/InputObjectType.swift index 5f613d2e..123e3b67 100644 --- a/Sources/Graphiti/Types/InputObjectType.swift +++ b/Sources/Graphiti/Types/InputObjectType.swift @@ -14,11 +14,17 @@ public final class InputObjectTypeBuilder { /// Export all properties using reflection /// /// - Throws: Reflection Errors - public func exportFields() throws { + public func exportFields(excluding: String...) throws { for property in try properties(Type.self) { - let field = InputObjectField(type: try schema.getInputType(from: property.type, field: property.key)) - fields[property.key] = field + if !excluding.contains(property.key) { + let field = InputObjectField(type: try schema.getInputType(from: property.type, field: property.key)) + fields[property.key] = field + } } } + + public func addFieldMap(key: String, fieldMap: InputObjectField) { + fields[key] = fieldMap + } } From 71407fbe08fdc372df47aaacf12d2302f9789677 Mon Sep 17 00:00:00 2001 From: Mike Pollard Date: Wed, 4 Apr 2018 15:03:33 +0100 Subject: [PATCH 04/10] update dependencies to swift4.1 --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 3e6ced57..84002384 100644 --- a/Package.swift +++ b/Package.swift @@ -3,6 +3,6 @@ import PackageDescription let package = Package( name: "Graphiti", dependencies: [ - .Package(url: "https://github.com/GraphQLSwift/GraphQL.git", majorVersion: 0, minor: 3), + .Package(url: "https://github.com/GraphQLSwift/GraphQL.git", majorVersion: 0, minor: 4), ] ) From 2d25718bc3c6f4a54632d6a930a7c0e9264149c8 Mon Sep 17 00:00:00 2001 From: Mike Pollard Date: Wed, 4 Apr 2018 15:22:59 +0100 Subject: [PATCH 05/10] Update to use new Runtime library --- Sources/Graphiti/Schema/Schema.swift | 11 +++++++---- Sources/Graphiti/Types/Field.swift | 12 ++++++++---- Sources/Graphiti/Types/InputObjectType.swift | 12 ++++++++---- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/Sources/Graphiti/Schema/Schema.swift b/Sources/Graphiti/Schema/Schema.swift index 0f9fa0eb..7e3a2c7d 100644 --- a/Sources/Graphiti/Schema/Schema.swift +++ b/Sources/Graphiti/Schema/Schema.swift @@ -1,4 +1,5 @@ import GraphQL +import Runtime public final class SchemaBuilder { var graphQLTypeMap: [AnyType: GraphQLType] = [ @@ -462,15 +463,17 @@ extension SchemaBuilder { return [:] } - for property in try properties(type) { + let info = try typeInfo(of: type) + + for property in info.properties { if case let propertyType as MapInitializable.Type = property.type { let argument = GraphQLArgument( type: try getInputType(from: propertyType, field: field), - description: argumentsType.descriptions[property.key], - defaultValue: try argumentsType.defaultValues[property.key]?.asMap() + description: argumentsType.descriptions[property.name], + defaultValue: try argumentsType.defaultValues[property.name]?.asMap() ) - arguments[property.key] = argument + arguments[property.name] = argument } } diff --git a/Sources/Graphiti/Types/Field.swift b/Sources/Graphiti/Types/Field.swift index 6bba252e..9e2cca08 100644 --- a/Sources/Graphiti/Types/Field.swift +++ b/Sources/Graphiti/Types/Field.swift @@ -1,4 +1,5 @@ import GraphQL +import Runtime public protocol InputType : MapInitializable {} public protocol OutputType : MapFallibleRepresentable {} @@ -45,10 +46,13 @@ public class FieldBuilder { /// - Parameter excluding: properties excluded from the export /// - Throws: Reflection Errors public func exportFields(excluding: String...) throws { - for property in try properties(Type.self) { - if !excluding.contains(property.key) { - let field = GraphQLField(type: try schema.getOutputType(from: property.type, field: property.key)) - fields[property.key] = field + + let info = try typeInfo(of: Type.self) + + for property in info.properties { + if !excluding.contains(property.name) { + let field = GraphQLField(type: try schema.getOutputType(from: property.type, field: property.name)) + fields[property.name] = field } } } diff --git a/Sources/Graphiti/Types/InputObjectType.swift b/Sources/Graphiti/Types/InputObjectType.swift index 123e3b67..cf423bf1 100644 --- a/Sources/Graphiti/Types/InputObjectType.swift +++ b/Sources/Graphiti/Types/InputObjectType.swift @@ -1,4 +1,5 @@ import GraphQL +import Runtime public final class InputObjectTypeBuilder { var schema: SchemaBuilder @@ -15,10 +16,13 @@ public final class InputObjectTypeBuilder { /// /// - Throws: Reflection Errors public func exportFields(excluding: String...) throws { - for property in try properties(Type.self) { - if !excluding.contains(property.key) { - let field = InputObjectField(type: try schema.getInputType(from: property.type, field: property.key)) - fields[property.key] = field + + let info = try typeInfo(of: Type.self) + + for property in info.properties { + if !excluding.contains(property.name) { + let field = InputObjectField(type: try schema.getInputType(from: property.type, field: property.name)) + fields[property.name] = field } } } From 9fd4bd822e5b2ee5002e859a69e585c0b3bac6db Mon Sep 17 00:00:00 2001 From: Mike Pollard Date: Fri, 6 Apr 2018 10:21:24 +0100 Subject: [PATCH 06/10] swift4.1 changes cherry picked from https://github.com/jseibert/Graphiti/commit/f090f8bb10ae098fea40ebea7d0da4370c6b0ef2 --- Package.swift | 14 ++++++++++- Sources/Graphiti/Graphiti.swift | 6 ++--- Sources/Graphiti/Schema/Schema.swift | 1 - Sources/Graphiti/Types/Field.swift | 25 +++++++++---------- Sources/Graphiti/Types/InterfaceType.swift | 4 +-- .../HelloWorldTests/HelloWorldTests.swift | 2 +- .../StarWarsTests/StarWarsQueryTests.swift | 16 +++++++++--- 7 files changed, 43 insertions(+), 25 deletions(-) diff --git a/Package.swift b/Package.swift index 84002384..bbad1360 100644 --- a/Package.swift +++ b/Package.swift @@ -1,8 +1,20 @@ +// swift-tools-version:4.0 import PackageDescription let package = Package( name: "Graphiti", + + products: [ + .library(name: "Graphiti", targets: ["Graphiti"]), + ], + dependencies: [ - .Package(url: "https://github.com/GraphQLSwift/GraphQL.git", majorVersion: 0, minor: 4), + .package(url: "https://github.com/SportlabsTechnology/GraphQL.git", .branch("master")), + ], + + targets: [ + .target(name: "Graphiti", dependencies: ["GraphQL"]), + + .testTarget(name: "GraphitiTests", dependencies: ["Graphiti"]), ] ) diff --git a/Sources/Graphiti/Graphiti.swift b/Sources/Graphiti/Graphiti.swift index f102fa1e..9470ffe0 100644 --- a/Sources/Graphiti/Graphiti.swift +++ b/Sources/Graphiti/Graphiti.swift @@ -19,7 +19,7 @@ final class AnyType : Hashable { } func isProtocol(type: Any.Type) -> Bool { - let description = String(describing: type(of: type)) + let description = String(describing: Swift.type(of: type)) return description.hasSuffix("Protocol") } @@ -29,11 +29,11 @@ func fixName(_ name: String) -> String { var workingString = name if name.hasPrefix("(") { - workingString = String(name.characters.dropFirst()) + workingString = String(name.dropFirst()) } var newName: [Character] = [] - for character in workingString.characters { + for character in workingString { if character != " " { newName.append(character) } else { diff --git a/Sources/Graphiti/Schema/Schema.swift b/Sources/Graphiti/Schema/Schema.swift index 7e3a2c7d..69c1aef6 100644 --- a/Sources/Graphiti/Schema/Schema.swift +++ b/Sources/Graphiti/Schema/Schema.swift @@ -464,7 +464,6 @@ extension SchemaBuilder { } let info = try typeInfo(of: type) - for property in info.properties { if case let propertyType as MapInitializable.Type = property.type { let argument = GraphQLArgument( diff --git a/Sources/Graphiti/Types/Field.swift b/Sources/Graphiti/Types/Field.swift index 9e2cca08..00be722d 100644 --- a/Sources/Graphiti/Types/Field.swift +++ b/Sources/Graphiti/Types/Field.swift @@ -46,7 +46,6 @@ public class FieldBuilder { /// - Parameter excluding: properties excluded from the export /// - Throws: Reflection Errors public func exportFields(excluding: String...) throws { - let info = try typeInfo(of: Type.self) for property in info.properties { @@ -69,11 +68,11 @@ public class FieldBuilder { if let resolve = resolve { r = { source, _, context, info in guard let s = source as? Type else { - throw GraphQLError(message: "Expected source type \(Type.self) but got \(type(of: source))") + throw GraphQLError(message: "Expected source type \(Type.self) but got \(Swift.type(of: source))") } guard let c = context as? Context else { - throw GraphQLError(message: "Expected context type \(Context.self) but got \(type(of: context))") + throw GraphQLError(message: "Expected context type \(Context.self) but got \(Swift.type(of: context))") } guard let output = try resolve(s, NoArguments(), c, info) else { @@ -107,11 +106,11 @@ public class FieldBuilder { if let resolve = resolve { r = { source, _, context, info in guard let s = source as? Type else { - throw GraphQLError(message: "Expected source type \(Type.self) but got \(type(of: source))") + throw GraphQLError(message: "Expected source type \(Type.self) but got \(Swift.type(of: source))") } guard let c = context as? Context else { - throw GraphQLError(message: "Expected context type \(Context.self) but got \(type(of: context))") + throw GraphQLError(message: "Expected context type \(Context.self) but got \(Swift.type(of: context))") } return try resolve(s, NoArguments(), c, info) @@ -141,11 +140,11 @@ public class FieldBuilder { if let resolve = resolve { r = { source, _, context, info in guard let s = source as? Type else { - throw GraphQLError(message: "Expected source type \(Type.self) but got \(type(of: source))") + throw GraphQLError(message: "Expected source type \(Type.self) but got \(Swift.type(of: source))") } guard let c = context as? Context else { - throw GraphQLError(message: "Expected context type \(Context.self) but got \(type(of: context))") + throw GraphQLError(message: "Expected context type \(Context.self) but got \(Swift.type(of: context))") } return try resolve(s, NoArguments(), c, info) @@ -190,11 +189,11 @@ public class FieldBuilder { if let resolve = resolve { r = { source, _, context, info in guard let s = source as? Type else { - throw GraphQLError(message: "Expected source type \(Type.self) but got \(type(of: source))") + throw GraphQLError(message: "Expected source type \(Type.self) but got \(Swift.type(of: source))") } guard let c = context as? Context else { - throw GraphQLError(message: "Expected context type \(Context.self) but got \(type(of: context))") + throw GraphQLError(message: "Expected context type \(Context.self) but got \(Swift.type(of: context))") } return try resolve(s, NoArguments(), c, info) @@ -229,13 +228,13 @@ public class FieldBuilder { resolve: resolve.map { resolve in return { source, args, context, info in guard let s = source as? Type else { - throw GraphQLError(message: "Expected source type \(Type.self) but got \(type(of: source))") + throw GraphQLError(message: "Expected source type \(Type.self) but got \(Swift.type(of: source))") } let a = try A(map: args) guard let c = context as? Context else { - throw GraphQLError(message: "Expected context type \(Context.self) but got \(type(of: context))") + throw GraphQLError(message: "Expected context type \(Context.self) but got \(Swift.type(of: context))") } guard let output = try resolve(s, a, c, info) else { @@ -267,13 +266,13 @@ public class FieldBuilder { resolve: resolve.map { resolve in return { source, args, context, info in guard let s = source as? Type else { - throw GraphQLError(message: "Expected type \(Type.self) but got \(type(of: source))") + throw GraphQLError(message: "Expected type \(Type.self) but got \(Swift.type(of: source))") } let a = try A(map: args) guard let c = context as? Context else { - throw GraphQLError(message: "Expected context type \(Context.self) but got \(type(of: context))") + throw GraphQLError(message: "Expected context type \(Context.self) but got \(Swift.type(of: context))") } return try resolve(s, a, c, info) diff --git a/Sources/Graphiti/Types/InterfaceType.swift b/Sources/Graphiti/Types/InterfaceType.swift index e25db07f..82ac25c8 100644 --- a/Sources/Graphiti/Types/InterfaceType.swift +++ b/Sources/Graphiti/Types/InterfaceType.swift @@ -13,11 +13,11 @@ public final class InterfaceTypeBuilder : FieldBuilder) { self.resolveType = { value, context, info in guard let v = value as? Type else { - throw GraphQLError(message: "Expected value type \(Type.self) but got \(type(of: value))") + throw GraphQLError(message: "Expected value type \(Type.self) but got \(Swift.type(of: value))") } guard let c = context as? Context else { - throw GraphQLError(message: "Expected context type \(Context.self) but got \(type(of: context))") + throw GraphQLError(message: "Expected context type \(Context.self) but got \(Swift.type(of: context))") } let type = try resolve(v, c, info) diff --git a/Tests/GraphitiTests/HelloWorldTests/HelloWorldTests.swift b/Tests/GraphitiTests/HelloWorldTests/HelloWorldTests.swift index 76355a38..aff31c83 100644 --- a/Tests/GraphitiTests/HelloWorldTests/HelloWorldTests.swift +++ b/Tests/GraphitiTests/HelloWorldTests/HelloWorldTests.swift @@ -15,7 +15,7 @@ extension Float : InputType, OutputType { class HelloWorldTests : XCTestCase { let schema = try! Schema { schema in try schema.query { query in - try query.field(name: "hello", type: String.self) { _ in + try query.field(name: "hello", type: String.self) { (_, _, _, _) -> String in "world" } } diff --git a/Tests/GraphitiTests/StarWarsTests/StarWarsQueryTests.swift b/Tests/GraphitiTests/StarWarsTests/StarWarsQueryTests.swift index c6d425db..a72c665f 100644 --- a/Tests/GraphitiTests/StarWarsTests/StarWarsQueryTests.swift +++ b/Tests/GraphitiTests/StarWarsTests/StarWarsQueryTests.swift @@ -443,9 +443,15 @@ class StarWarsQueryTests : XCTestCase { struct A : OutputType {} try schema.object(type: A.self) { a in - try a.field(name: "nullableA", type: (TypeReference?).self) { _ in A() } - try a.field(name: "nonNullA", type: TypeReference.self) { _ in A() } - try a.field(name: "throws", type: String.self) { _ in + try a.field(name: "nullableA", type: (TypeReference?).self) { (_, _, _, _) -> A? + in A() + } + + try a.field(name: "nonNullA", type: TypeReference.self) { (_, _, _, _) -> A + in A() + } + + try a.field(name: "throws", type: String.self) { (_, _, _, _) -> String in struct 🏃 : Error, CustomStringConvertible { let description: String } @@ -455,7 +461,9 @@ class StarWarsQueryTests : XCTestCase { } try schema.query { query in - try query.field(name: "nullableA", type: (A?).self) { _ in A() } + try query.field(name: "nullableA", type: (A?).self) { (_, _, _, _) -> A? in + A() + } } } From 32bfa34f5d5071505339b2f49f2b41ef9fb49f8d Mon Sep 17 00:00:00 2001 From: Mike Pollard Date: Fri, 6 Apr 2018 10:47:51 +0100 Subject: [PATCH 07/10] Update .travis.yml to use xcode9.3beta --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6576a483..c3d5e3b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ matrix: include: - os: osx env: JOB=SwiftPM_OSX - osx_image: xcode9 + osx_image: xcode9.3beta - os: linux env: JOB=SwiftPM_linux dist: trusty From 9350ad6b18d6d55639d1dacba628c81348854719 Mon Sep 17 00:00:00 2001 From: Mike Pollard Date: Tue, 10 Apr 2018 09:46:38 +0100 Subject: [PATCH 08/10] Update to GraphQLSwift/GraphQL 0.5.0 --- Package.resolved | 25 +++++++++++++++++++++++++ Package.swift | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 Package.resolved diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 00000000..d4394b94 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,25 @@ +{ + "object": { + "pins": [ + { + "package": "GraphQL", + "repositoryURL": "https://github.com/GraphQLSwift/GraphQL.git", + "state": { + "branch": null, + "revision": "faa869cdf0214cf25aa8df1081891b5e8647d6df", + "version": "0.5.0" + } + }, + { + "package": "Runtime", + "repositoryURL": "https://github.com/wickwirew/Runtime.git", + "state": { + "branch": null, + "revision": "9f9e3078fff093adbd8f43df1052ee5d68b05c2a", + "version": "0.6.0" + } + } + ] + }, + "version": 1 +} diff --git a/Package.swift b/Package.swift index bbad1360..96abb64b 100644 --- a/Package.swift +++ b/Package.swift @@ -9,7 +9,7 @@ let package = Package( ], dependencies: [ - .package(url: "https://github.com/SportlabsTechnology/GraphQL.git", .branch("master")), + .package(url: "https://github.com/GraphQLSwift/GraphQL.git", from: "0.5.0"), ], targets: [ From 05b4dd64474fd7bcae37a0f9aebe79ae9f749404 Mon Sep 17 00:00:00 2001 From: Mike Pollard Date: Tue, 10 Apr 2018 09:52:38 +0100 Subject: [PATCH 09/10] Change .travis.yml to only run codecov on macOS --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c3d5e3b7..611b6c5f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,4 +16,6 @@ script: - swift build -c release - swift build - swift test - - eval "$(curl -sL https://raw.githubusercontent.com/lgaches/swifttravisci/master/codecov)" + - 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + eval "$(curl -sL https://raw.githubusercontent.com/lgaches/swifttravisci/master/codecov)"; + fi' From b42b3ac693bb44b827feac23840f84441a4ec489 Mon Sep 17 00:00:00 2001 From: Mike Pollard Date: Tue, 10 Apr 2018 10:07:25 +0100 Subject: [PATCH 10/10] Update .swift-version to 4.1 --- .swift-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.swift-version b/.swift-version index 5186d070..7d5c902e 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.0 +4.1