First of all, thanks for considering to contribute to GraphQL Swift! 🎉🚀🎡
The goal of this implementation to not follow Facebook's reference implementation blindly, but to write it as "Swifty" as possible.
You can help us reach that goal with your contribution. This can be done in several ways:
- Report any issues or bugs you discovered
- Open issues for feature requests
- Implement one of our starter tasks
Please consider using the following prefixes when creating new issues:
- [Discussion], if you want to discuss a possible new feature.
- [Wiki], if you discovered a typo or that something's missing in the Wiki.
If no prefix was specified we assume that your issue reports a bug.
All contributors are expected to follow our Code of Conduct. Please read it carefully before making any contribution 📖.
If you haven't installed Swift already, now is the time. This project uses Swift 4.2.
Because GraphQL Swift is a Swift PM library, we decided to put the .xcodeproj
on the .gitignore
, because maybe not every contributor prefers to use Xcode for writing their Swift code. However, if you do want to work in Xcode, you have to generate a project by running this one-liner in the root directory:
swift package generate-xcodeproj --enable-code-coverage
This also enables code coverage reporting for the unit tests.
GraphQL Swift uses SwiftLint to ensure a consistent code style 🎨. Please install it on your machine and run it before making commits. Our continuous integration will also run linting and tell you if something's wrong after you submitted a pull request.
brew install swiftlint
We use XCTest
to write unit tests for the project which you can run in Xcode by pressing cmd + u
or by simply executing swift test
inside the root directory.
You should add tests when adding functionality to existing features or when adding new ones.
If you have any questions feel free to open an issue where we can discuss further steps.
Thanks again and talk to you soon! 👋