Skip to content

Commit 0b881d2

Browse files
docs: Consistency with other GraphQLSwift projects
1 parent 99c0c5f commit 0b881d2

1 file changed

Lines changed: 7 additions & 31 deletions

File tree

README.md

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,15 @@
55

66
This is a Swift package plugin that generates server-side GraphQL API code from GraphQL schema files, inspired by [GraphQL Tools' makeExecutableSchema](https://the-guild.dev/graphql/tools/docs/generate-schema) and [Swift's OpenAPI Generator](https://github.com/apple/swift-openapi-generator).
77

8-
To expose your schema through HTTP, check out [graphql-vapor](https://github.com/GraphQLSwift/graphql-vapor) or [graphql-hummingbird](https://github.com/GraphQLSwift/graphql-hummingbird). To define your schema in native Swift, use [Graphiti](https://github.com/GraphQLSwift/Graphiti) instead.
9-
10-
## Features
11-
12-
- **Data-driven**: Guarantee conformance with the declared GraphQL spec
13-
- **Type-safe**: Leverages Swift's type system for compile-time safety
14-
- **Flexible implementation**: Makes no assumptions about backing data types other than GraphQL type conformance
15-
- **Minimal boilerplate**: Generates all the piping between Swift and GraphQL - you just write the resolvers
16-
17-
## Installation
8+
Using this package has the following benefits:
9+
- Guarantees conformance with the declared GraphQL spec
10+
- Leverages Swift's type system for compile-time safety
11+
- Flexiblity in backing data types
12+
- Generates all the piping between Swift and GraphQL - you just write the resolvers
1813

19-
Add the package to your `Package.swift`. Be sure to add the `GraphQLGeneratorRuntime` dependency to your package, and add the `GraphQLGeneratorPlugin` to the plugins section:
20-
21-
```swift
22-
dependencies: [
23-
.package(url: "https://github.com/GraphQLSwift/GraphQL.git", from: "4.1.0"),
24-
.package(url: "https://github.com/GraphQLSwift/graphql-generator", from: "1.0.0")
25-
],
26-
targets: [
27-
.target(
28-
name: "YourTarget",
29-
dependencies: [
30-
.product(name: "GraphQL", package: "GraphQL"),
31-
.product(name: "GraphQLGeneratorRuntime", package: "graphql-generator"),
32-
],
33-
plugins: [
34-
.plugin(name: "GraphQLGeneratorPlugin", package: "graphql-generator")
35-
]
36-
)
37-
]
38-
```
14+
To expose your schema through HTTP, check out [graphql-vapor](https://github.com/GraphQLSwift/graphql-vapor) or [graphql-hummingbird](https://github.com/GraphQLSwift/graphql-hummingbird). To define your schema in native Swift, use [Graphiti](https://github.com/GraphQLSwift/Graphiti) instead.
3915

40-
## Quick Start
16+
## Usage
4117

4218
Take a look at the example projects to see real, fully featured implementations:
4319
- [HelloWorldServer](Examples/HelloWorldServer) - Demonstrates all GraphQL type mappings with a comprehensive schema

0 commit comments

Comments
 (0)