# Package com.codename1.annotations.graphql

package com.codename1.annotations.graphql

Annotations for declaring type safe GraphQL clients.

A client interface is marked with `GraphQLClient` and its methods are mapped to GraphQL operations using `Query`, `Mutation` and `Subscription`, while `Var` binds method parameters to GraphQL variables. These annotations are consumed by the Codename One GraphQL client generator to produce the network implementation.

- Related Packages
  Package
  Description
  com.codename1.annotations
  Codename One specific Java annotations used by the build pipeline and the ParparVM bytecode translator to mark methods and classes for special treatment -- e.g.
  com.codename1.annotations.grpc
  gRPC-Web client annotations.
  com.codename1.annotations.rest
  Annotations for declaring type safe REST clients.
- Annotation Types
  Class
  Description
  GraphQLClient
  Marks an interface as a GraphQL client that the build-time annotation processor wires up to a generated implementation.
  Mutation
  Declares a `GraphQLClient` method as a GraphQL mutation.
  Query
  Declares a `GraphQLClient` method as a GraphQL query.
  Subscription
  Declares a `GraphQLClient` method as a GraphQL subscription, streamed over a WebSocket using the `graphql-transport-ws` protocol.
  Var
  Binds a `GraphQLClient` method parameter to a GraphQL operation variable.