Apollo Gradle Plugin

Gradle plugin for generating java classes for graphql files

License

License

MIT
Categories

Categories

Gradle Build Tools Apollo Container Microservices
GroupId

GroupId

com.apollographql.apollo
ArtifactId

ArtifactId

gradle-plugin
Last Version

Last Version

0.4.1
Release Date

Release Date

Type

Type

jar
Description

Description

Apollo Gradle Plugin
Gradle plugin for generating java classes for graphql files
Project URL

Project URL

https://github.com/apollographql/apollo-android/
Source Code Management

Source Code Management

https://github.com/apollographql/apollo-android/

Download gradle-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/com.apollographql.apollo/gradle-plugin/ -->
<dependency>
    <groupId>com.apollographql.apollo</groupId>
    <artifactId>gradle-plugin</artifactId>
    <version>0.4.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.apollographql.apollo/gradle-plugin/
implementation 'com.apollographql.apollo:gradle-plugin:0.4.1'
// https://jarcasting.com/artifacts/com.apollographql.apollo/gradle-plugin/
implementation ("com.apollographql.apollo:gradle-plugin:0.4.1")
'com.apollographql.apollo:gradle-plugin:jar:0.4.1'
<dependency org="com.apollographql.apollo" name="gradle-plugin" rev="0.4.1">
  <artifact name="gradle-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.apollographql.apollo', module='gradle-plugin', version='0.4.1')
)
libraryDependencies += "com.apollographql.apollo" % "gradle-plugin" % "0.4.1"
[com.apollographql.apollo/gradle-plugin "0.4.1"]

Dependencies

compile (3)

Group / Artifact Type Version
com.apollographql.apollo : compiler jar 0.4.1
com.moowork.gradle » gradle-node-plugin jar 1.0.0
com.android.tools.build : gradle jar 2.3.1

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.spockframework : spock-core jar 0.7-groovy-2.0

Project Modules

There are no modules declared in this project.

Apollo Android

GitHub license Join Spectrum Slack CI Maven Central OSS Snapshots

Apollo Android is a GraphQL client that generates Java and Kotlin models from GraphQL queries. These models give you a type-safe API to work with GraphQL servers. Apollo helps you keep your GraphQL query statements together, organized, and easy to access.

This library is designed primarily with Android in mind, but you can use it in any Java/Kotlin app.

Features

  • Java and Kotlin code generation
  • Queries, Mutations and Subscriptions
  • Reflection-free parsing of responses
  • HTTP cache
  • Normalized cache
  • File uploads
  • Custom scalar types
  • Support for RxJava2, RxJava3, and Coroutines

Getting started

If you are new to GraphQL, check out the tutorial that will guide you through building an Android app using Apollo, Kotlin and coroutines.

If you'd like to add Apollo Android to an existing project:

Advanced topics

Check the project website for in depth documentation about caching, plugin configuration, android, file upload, coroutines, rxjava2, rxjava3, persisted queries, no runtime, migrations and much more...

IntelliJ Plugin

The JS Graphql IntelliJ Plugin provides auto-completion, error highlighting, and go-to-definition functionality for your .graphql files. You can create a .graphqlconfig file to use GraphQL scratch files to work with your schema outside product code (such as to write temporary queries to test resolvers).

Releases

The latest version is Maven Central

Check the changelog for the release history.

Releases are hosted on Jcenter and Maven Central. The plugin is additionally hosted on the Gradle Plugin Portal

plugins {
  id("com.apollographql.apollo").version("x.y.z")
}

repositories {
  mavenCentral()
}

dependencies {
  implementation("com.apollographql.apollo:apollo-runtime:x.y.z")

  // optional: if you want to use the normalized cache
  implementation("com.apollographql.apollo:apollo-normalized-cache-sqlite:x.y.z")
  // optional: for coroutines support
  implementation("com.apollographql.apollo:apollo-coroutines-support:x.y.z")
  // optional: for RxJava3 support  
  implementation("com.apollographql.apollo:apollo-rx3-support:x.y.z")
  // optional: if you just want the generated models and parsers and write your own HTTP code/cache code, you can remove apollo-runtime
  // and use apollo-api instead  
  implementation("com.apollographql.apollo:apollo-api:x.y.z")
}

Snapshots

Latest development changes are available in Sonatype's snapshots repository:

repositories {
  maven { 
    url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
  }
}

Requirements

Apollo Android runs on the following platforms:

  • Android API level 15+
  • JDK 8+
  • iOS 13+

Contributing

If you'd like to contribute, please see Contributing.md.

Additional resources

com.apollographql.apollo

Apollo GraphQL

A community building flexible open source tools for GraphQL.

Versions

Version
0.4.1
0.4.0
0.3.3
0.3.2
0.3.1
0.3.0