Skip to content

Latest commit

 

History

History
66 lines (38 loc) · 2.74 KB

CONTRIBUTING.md

File metadata and controls

66 lines (38 loc) · 2.74 KB

Contributing to GraphQL Swift

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:

Issue prefixes

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.

Code of Conduct

All contributors are expected to follow our Code of Conduct. Please read it carefully before making any contribution 📖.

Setting up the project for Development

Install Swift

If you haven't installed Swift already, now is the time. This project uses Swift 4.2.

Generate Xcode Project 🏗

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.

Linting 💅

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

Testing

Running tests

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.

Writing tests

You should add tests when adding functionality to existing features or when adding new ones.

Questions

If you have any questions feel free to open an issue where we can discuss further steps.

Thanks again and talk to you soon! 👋