{"repo":"GraphQLSwift/Graphiti","free":true,"listed":false,"github":"https://github.com/GraphQLSwift/Graphiti","clone":"git clone https://github.com/GraphQLSwift/Graphiti.git","description":"The Swift GraphQL Schema builder for macOS and Linux","language":"Swift","stars":561,"topics":["graphql","swift","vapor","swiftpm","swift-nio","graphiti"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Graphiti [![Platforms][platforms-badge]][platforms-url] [![Versions][versions-badge]][versions-url] [![License][mit-badge]][mit-url] [![GitHub Actions][gh-actions-badge]][gh-actions-url] Graphiti is a Swift library for building GraphQL schemas fast, safely and easily in Swift code. To expose your schema through HTTP, check out graphql-vapor or graphql-hummingbird, and to generate Swift code from GraphQL SDL files, use graphql-generator instead. Getting Started An overview of GraphQL in general is available in the README for the Specification for GraphQL. That overview describes a simple set of GraphQL examples that exist as tests in this repository. A good way to get started with this repository is to walk through that README and the corresponding tests in parallel. Using Graphiti Add Graphiti to your Package.swift Graphiti provides two important capabilities: building a type schema, and serving queries against that type schema. Defining entities First, we declare our regular Swift entities. ⭐️ One of the main design decisions behind Graphiti is not to polute your entities declarations. This way you can bring your entities to any other solution with ease. Defining the context Second step is to create your application's context . The context will be passed to all of your field resolver functions. This allows you to apply dependency injection to your API. This is the place where you can put code that talks to a database or another service. ⭐️ Notice again that this step doesn't","default_branch":null,"files":null,"tree":[],"storefront":"/r/GraphQLSwift","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/GraphQLSwift/Graphiti/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}