Skip to content

Using Annotations

Igor Dianov edited this page May 29, 2024 · 1 revision

GraphQL JPA Query provides a well documented schema for your domain entity model. You can use provided standalone dependency to annotate JPA entity classes and attributes with @GraphQLDescription annotation:

<dependency>
  <groupId>com.introproventures</groupId>
  <artifactId>graphql-jpa-query-annotations</artifactId>
  <version>tag</version>
</dependency>

The Schema Builder will introspect @GraphQLDescription annotation on Java types and fields. Your entity and field descriptions will show up in the GraphQL Documentation metadata to help you provide documented API to end-users.

You can also use @GraphQLIgnore annotation to exclude entity type or field from schema.