Skip to content

Commit 4b6bfc6

Browse files
feature: Adds swiftformat instructions to readme
1 parent a9cdbd8 commit 4b6bfc6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ To execute a subscription use the `graphqlSubscribe` function:
9797
```swift
9898
let subscriptionResult = try graphqlSubscribe(
9999
schema: schema,
100-
request: "{ hello }",
101-
eventLoopGroup: eventLoopGroup
102100
).wait()
103101
// Must downcast from EventStream to concrete type to use in 'for await' loop below
104102
let concurrentStream = subscriptionResult.stream! as! ConcurrentEventStream
@@ -131,6 +129,13 @@ Those contributing to this package are expected to follow the [Swift Code of Con
131129
[Swift API Design Guidelines](https://swift.org/documentation/api-design-guidelines/), and the
132130
[SSWG Technical Best Practices](https://github.com/swift-server/sswg/blob/main/process/incubation.md#technical-best-practices).
133131

132+
This repo uses [SwiftFormat](https://github.com/nicklockwood/SwiftFormat), and includes lint checks to enforce these formatting standards.
133+
To format your code, install `swiftformat` and run:
134+
135+
```bash
136+
swiftformat .
137+
```
138+
134139
Most of this repo mirrors the structure of
135140
(the canonical GraphQL implementation written in Javascript/Typescript)[https://github.com/graphql/graphql-js]. If there is any feature
136141
missing, looking at the original code and "translating" it to Swift works, most of the time. For example:

0 commit comments

Comments
 (0)