README.md (3871B)
1 # Absinthe 2 3 [![Build Status](https://github.com/absinthe-graphql/absinthe/workflows/CI/badge.svg)](https://github.com/absinthe-graphql/absinthe/actions?query=workflow%3ACI) 4 [![Version](https://img.shields.io/hexpm/v/absinthe.svg)](https://hex.pm/packages/absinthe) 5 [![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/absinthe/) 6 [![Download](https://img.shields.io/hexpm/dt/absinthe.svg)](https://hex.pm/packages/absinthe) 7 [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) 8 [![Last Updated](https://img.shields.io/github/last-commit/absinthe-graphql/absinthe.svg)](https://github.com/absinthe-graphql/absinthe/commits/master) 9 10 [GraphQL](https://facebook.github.io/graphql/) implementation for Elixir. 11 12 Goals: 13 14 - Complete implementation of the [GraphQL Working Draft](https://spec.graphql.org/draft/). 15 - An idiomatic, readable, and comfortable API for Elixir developers 16 - Extensibility based on small parts that do one thing well. 17 - Detailed error messages and documentation. 18 - A focus on robustness and production-level performance. 19 20 Please see the website at [http://absinthe-graphql.org](http://absinthe-graphql.org). 21 22 ## Why Use Absinthe? 23 24 Absinthe goes far beyond GraphQL specification basics. 25 26 ### Easy-to-Read, Fast-to-Run Schemas 27 28 Absinthe schemas are defined using easy-to-read macros that build and verify 29 their structure at compile-time, preventing runtime errors and increasing 30 performance. 31 32 ### Pluggability 33 34 The entire query processing pipeline is configurable. Add, swap out, or remove 35 the parser, individual validations, or resolution logic at will, even on a 36 per-document basis. 37 38 ### Advanced Resolution 39 40 Absinthe includes a number of advanced resolution features, to include: 41 42 - Asynchronous field resolution 43 - Batched field resolution (addressing N+1 query problems) 44 - A resolution plugin system supporting further extensibility 45 46 ### Safety 47 48 - Complexity analysis and configurable limiting 49 - Support for precompiled documents/preventing custom documents 50 51 ### Idiomatic Documents, Idiomatic Code 52 53 Write your schemas in idiomatic Elixir `snake_case` notation. Absinthe can 54 transparently translate to `camelCase` notation for your API clients. 55 56 Or, define your own translation schema by writing a simple adapter. 57 58 ### Frontend Support 59 60 We care about support for third-party frameworks, both on the back and 61 front end. 62 63 So far, we include specialized support for Phoenix and Plug on the backend, 64 and [Relay](https://facebook.github.io/relay/) on the frontend. 65 66 Of course we work out of the box with other frontend frameworks and GraphQL 67 clients, too. 68 69 ## Installation 70 71 Install from [Hex.pm](https://hex.pm/packages/absinthe): 72 73 ```elixir 74 def deps do 75 [{:absinthe, "~> 1.6.0"}] 76 end 77 ``` 78 79 Note: Absinthe requires Elixir 1.10 or higher. 80 81 ## Upgrading 82 83 See [CHANGELOG](./CHANGELOG.md) for upgrade steps between versions. 84 85 ## Documentation 86 87 - [Absinthe hexdocs](https://hexdocs.pm/absinthe). 88 - For the tutorial, guides, and general information about Absinthe-related 89 projects, see [http://absinthe-graphql.org](http://absinthe-graphql.org). 90 91 ### Mix Tasks 92 93 Absinthe includes a number of useful Mix tasks for extracting schema metadata. 94 95 Run `mix help` in your project and look for tasks starting with `absinthe`. 96 97 ## Related Projects 98 99 See the [GitHub organization](https://github.com/absinthe-graphql). 100 101 ## Community 102 103 The project is under constant improvement by a growing list of 104 contributors, and your feedback is important. Please join us in Slack 105 (`#absinthe-graphql` under the Elixir Slack account) or the Elixir Forum 106 (tagged `absinthe`). 107 108 Please remember that all interactions in our official spaces follow 109 our [Code of Conduct](./CODE_OF_CONDUCT.md). 110 111 ## Contribution 112 113 Please follow [contribution guide](./CONTRIBUTING.md). 114 115 ## License 116 117 See [LICENSE.md](./LICENSE.md).