Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1 #95

Merged
merged 57 commits into from
Nov 9, 2022
Merged

v1 #95

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
ec15714
fix: Removed the need for config objects
d-exclaimation Oct 31, 2022
2e027f7
feat: Middleware instead of manual routing
d-exclaimation Nov 1, 2022
b0ab63c
feat: WebSocket decoupling from Vapor
d-exclaimation Nov 1, 2022
9696131
feat: Decoupled Pioneer from Vapor
d-exclaimation Nov 1, 2022
203ff5e
fix: Removed unused imports
d-exclaimation Nov 1, 2022
d593b05
fix: Fixed test to be working on Swift 5.5
d-exclaimation Nov 1, 2022
5e9613f
fix: Renamed SocketIO and SocketClient to WebSocket
d-exclaimation Nov 1, 2022
a973f7f
fix: Removed unused Vapor imports
d-exclaimation Nov 1, 2022
2f58439
feat: Use AsyncSequence and Task to resolve WebSocket instead of call…
d-exclaimation Nov 1, 2022
1a23c6b
fix: Explicit Sendable for AsyncStream Termination on WebSocket
d-exclaimation Nov 1, 2022
eeaf842
fix: 400 Error instead of 500 if body is invalid
d-exclaimation Nov 1, 2022
01b14fb
fix: Fixed issue with catching AbortError
d-exclaimation Nov 1, 2022
ec9eb80
fix: Make sure decode throw bad request
d-exclaimation Nov 1, 2022
c52b7e2
fix: Fixed test
d-exclaimation Nov 1, 2022
c7947e4
doc: Added doc comments on new structs and functions
d-exclaimation Nov 1, 2022
7c9642e
chore: Removed DataLoader as dependency
d-exclaimation Nov 1, 2022
8337f0a
fix: Changed default HTTPStrategy to csrfPrevention
d-exclaimation Nov 1, 2022
e1d8c85
fix: Fixed pong respond
d-exclaimation Nov 1, 2022
4c8c122
feat: Path component from URI
d-exclaimation Nov 2, 2022
53d7713
chore: Added test for pathComponents
d-exclaimation Nov 2, 2022
e729bf8
feat: Better path matching
d-exclaimation Nov 2, 2022
7d0986c
fix: Removed usage of workaround aliases
d-exclaimation Nov 2, 2022
b7fd6e2
chore: Renamed parameters to match new names
d-exclaimation Nov 2, 2022
3530ece
feat: csrfVunerable
d-exclaimation Nov 3, 2022
92da573
chore: Added explaination on how csrf is prevented
d-exclaimation Nov 3, 2022
04a0ef6
Merge pull request #92 from d-exclaimation/v1
d-exclaimation Nov 3, 2022
0263235
chore: Renamed variable name to be more clear
d-exclaimation Nov 3, 2022
020a5f2
fix: Removed duplicate methods
d-exclaimation Nov 3, 2022
9405261
chore: Updated trigger for actions
d-exclaimation Nov 3, 2022
3a5a26c
doc: Moved v0 into its own directory
d-exclaimation Nov 4, 2022
036f42d
docs: New shorter getting started guide
d-exclaimation Nov 5, 2022
5b3c975
doc: Improved documentation
d-exclaimation Nov 5, 2022
8331471
fix: Removed unused event loop in test
d-exclaimation Nov 5, 2022
0fdc869
chore: Removed redudancy in test
d-exclaimation Nov 5, 2022
c407628
docs: Completed getting started guide
d-exclaimation Nov 5, 2022
bf52538
doc: Added skip button
d-exclaimation Nov 5, 2022
884200d
docs: Migration guide
d-exclaimation Nov 5, 2022
2b876fb
fix: Fixed naming
d-exclaimation Nov 5, 2022
32a0bd0
docs: Improvement getting-started and added fundamentals guides
d-exclaimation Nov 6, 2022
d217e67
docs: Methods should be linked to API reference
d-exclaimation Nov 6, 2022
4672ed5
docs: Home new icon and reference to Apollo Schema design
d-exclaimation Nov 6, 2022
aa12920
docs: Updated getting started guide
d-exclaimation Nov 6, 2022
009fdfe
fix: Changed subscription to use a more definitive icon
d-exclaimation Nov 6, 2022
d8252a1
docs: Added basic of Relationship fundamental
d-exclaimation Nov 6, 2022
d69be6d
docs: Relationship fundamental
d-exclaimation Nov 6, 2022
90414e3
docs: Feature section
d-exclaimation Nov 7, 2022
3c19f45
fix: Code formating and default option shown in docs
d-exclaimation Nov 7, 2022
3c5313a
docs: Web framework integration section
d-exclaimation Nov 7, 2022
52c5517
docs: Finished documentation (excluding integrations)
d-exclaimation Nov 7, 2022
46589bc
Merge pull request #93 from d-exclaimation/v1-info
d-exclaimation Nov 7, 2022
dcbb474
feat: HTTPGraphQLRequest and HTTPGraphQLResponse
d-exclaimation Nov 7, 2022
5ec3ac6
doc: GraphQL IDE + GraphQL over HTTP integration guide
d-exclaimation Nov 7, 2022
cfc7abc
fix: Fixed typo and added warning to remind myself
d-exclaimation Nov 7, 2022
695f5d3
doc: WebSocket integration
d-exclaimation Nov 9, 2022
134999f
doc: WebSocket integration
d-exclaimation Nov 9, 2022
293b8bb
doc: Finished up documentation
d-exclaimation Nov 9, 2022
f71ac7d
Merge pull request #94 from d-exclaimation/v1-integration
d-exclaimation Nov 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on:
push:
branches: [main]
pull_request:
branches: [main]
branches:
- main
- 'version-*'

jobs:
five-five:
Expand Down
99 changes: 20 additions & 79 deletions Documentation/README.md
Original file line number Diff line number Diff line change
@@ -1,87 +1,28 @@
---
icon: home
title: Welcome
icon: rocket
title: Introduction
---

# Welcome to Pioneer
# Introduction to Pioneer

[Pioneer](https://github.com/d-exclaimation/pioneer) is a simple GraphQL :unicorn_face: server built for Swift and Vapor that works with any GraphQL schema built with [GraphQLSwift/GraphQL](https://github.com/GraphQLSwift/GraphQL).
!!!success 📣 Pioneer v1 is generally available!
<small>See what's new!</small>
<br/>
<small>Docs for Pioneer v0 are [available here](/v0/features/async-await)</small>
!!!

![Pioneer](pioneer-banner.png)
Pioneer is an open-source, spec-compliant GraphQL server that's compatible with any GraphQL schema built with [GraphQLSwift/GraphQL](https://github.com/GraphQLSwift/GraphQL).

No complicated setup required to use Pioneer. It is as easy as plugging it into an existing Vapor application (it might even looked familiar).
![Pioneer and GraphQL as a layer between your Swift backend and your Web, iOS, and Android frontend](/static/pioneer-graphql.png)

Pioneer will configure all the necessary things to build a GraphQL API such as:
=== 🪛 Straightforward setup
Just plug it in and start working immediately
=== 🌐 Universal compability
Compability with any data source, any GraphQL client, any GraphQL schema built on top of [GraphQLSwift/GraphQL](https://github.com/GraphQLSwift/GraphQL)
=== 🕊 Subscriptions capable
Subscriptions using GraphQL over WebSocket protocols such as [graphql-ws](https://github.com/enisdenjo/graphql-ws) and [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws)
=== 🚀 Wide range of features
HTTP resolving strategy, extensive context building, [AsyncEventStream](https://swiftpackageindex.com/d-exclaimation/pioneer/documentation/pioneer/asynceventstream) and [PubSub](https://swiftpackageindex.com/d-exclaimation/pioneer/documentation/pioneer/pubsub)
===

- Handling operations through HTTP :incoming_envelope: (**GET** and **POST**).
- Adding GraphQL IDE like [GraphiQL](https://github.com/graphql/graphiql) with subscriptions support.
- Handling subscriptions through WebSocket :dove_of_peace:

## Quick Start

You can add Pioneer into any existing Vapor application with any GraphQL schema library made from [GraphQLSwift/GraphQL](https://github.com/GraphQLSwift/GraphQL) like [Graphiti](https://github.com/GraphQLSwift/Graphiti).

[!ref Getting Started](./guides/getting-started/setup.md)

Add this line to add Pioneer as one of your dependencies.

```swift
.package(url: "https://github.com/d-exclaimation/pioneer", from: "0.10.0")
```

Go to the `main.swift` or any Swift file where you apply your Vapor routing like your `routes.swift` file.

Next, contruct an new Pioneer instance with your flavour of configuration and apply it to any `RoutesBuilder`.

+++ Barebone Setup

```swift main.swift
import Vapor
import Pioneer
import Graphiti

let app = try Application(.detect())

let server = Pioneer(
schema: Schema<Void, Resolver> {
...
},
resolver: Resolver(),
websocketProtocol: .graphqlWs
)

server.applyMiddleware(on: app) // <- Apply routing to the Application directly

defer {
app.shutdown()
}

try app.run()
```

+++ Vapor template setup

```swift routes.swift
import Vapor
import Pioneer
import Graphiti

let server = Pioneer(
schema: Schema<Void, Resolver> {
...
},
resolver: Resolver(),
websocketProtocol: .graphqlWs
)

func routes(_ app: Application) throws {
app.get("hello") { req -> String in
return "Hello, world!"
}

server.applyMiddleware(on: app) // <- Apply routing to the Application directly
}

```

+++
[!ref Get started!](/getting-started)
259 changes: 0 additions & 259 deletions Documentation/features/configuration.md

This file was deleted.