/jwebmp-angular-graphql:jwebmp-angular-graphqlfrom jwebmp-angular-graphql
Generates typed Apollo Angular services from Java @NgGraphQL annotations for GraphQL queries, mutations, and subscriptions.
Ships in jwebmp-angular-graphql. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generates Apollo (apollo-angular) TypeScript services from Java annotations. Annotate a class with
@NgGraphQL, declare the GraphQL operation, and the framework emits a fully typed @Injectable Angular
service backed by Apollo and Angular signals — no handwritten TypeScript.
It mirrors the @NgRestClient pattern (see jwebmp-tsclient): one annotated Java class per GraphQL operation.
<dependency>
<groupId>com.jwebmp.plugins</groupId>
<artifactId>angular-graphql</artifactId>
</dependency>
com.jwebmp.angular.graphqlangular (com.jwebmp.core.angular) and typescript-client plugins.@TsDependency: apollo-angular ^11, @apollo/client ^4, graphql ^16.Implement INgGraphQLClient<Self> and annotate with @NgGraphQL. The implementing class is empty —
all TypeScript is generated from the annotation.
@NgGraphQL(
operation = """
query Users($active: Boolean) {
users(active: $active) { id name email }
}
""",
operationType = NgGraphQL.OperationType.QUERY,
fetchOnCreate = true)
@NgGraphQLVariable(name = "active", value = "true")
public class UsersQuery implements INgGraphQLClient<UsersQuery> { }
| Attribute | Default | Purpose |
|---|---|---|
operation | (required) | Raw GraphQL document; embedded into a gql template literal |
operationType | QUERY | QUERY, MUTATION, or SUBSCRIPTION |
value | "" | Optional service name base |
responseType | INgDataType.class (→ any) | Typed result class; imported automatically |
responseArray | false | Result is an array of responseType |
singleton | true | providedIn: 'root' vs 'any' |
fetchOnCreate | false | Auto-run on inject (QUERY → execute(), SUBSCRIPTION → subscribe(); never mutations) |
pollingEnabled | false | Query polling via Apollo pollInterval |
pollingIntervalMs | 30000 | Polling interval |
fetchPolicy | CACHE_FIRST | Apollo fetch policy (CACHE_AND_NETWORK, NETWORK_ONLY, CACHE_ONLY, NO_CACHE, STANDBY) |
errorPolicy | NONE | Apollo error policy (IGNORE, ALL) |
@NgGraphQLVariable(name, value) is repeatable; value is emitted as a raw TypeScript expression
(e.g. "true", "42", "'active'"). Defaults merge with call-time variables (call-time wins).
All operation types expose data(), loading(), error(), success() signals, plus reset(),
handleResult(), and ngOnDestroy cleanup. The trigger method depends on operationType:
execute(variables?), refetch(variables?), startPolling(ms?), stopPolling(), polling signal (uses apollo.watchQuery)mutate(variables?) (uses apollo.mutate; never auto-executes)subscribe(variables?) (uses apollo.subscribe)@NgGraphQL(
operation = """
mutation CreateOrder($input: OrderInput!) {
createOrder(input: $input) { id status }
}
""",
operationType = NgGraphQL.OperationType.MUTATION,
errorPolicy = NgGraphQL.ErrorPolicy.ALL)
public class CreateOrderMutation implements INgGraphQLClient<CreateOrderMutation> { }
@NgGraphQL(
operation = """
subscription OnNotification {
notificationAdded { id message }
}
""",
operationType = NgGraphQL.OperationType.SUBSCRIPTION,
responseArray = true,
fetchOnCreate = true)
public class NotificationSubscription implements INgGraphQLClient<NotificationSubscription> { }
INgGraphQLClient<Self> in a package scanned by GuicedEE.@NgGraphQL with the operation text and matching operationType.responseType to an INgDataType class and use responseArray for lists.@NgGraphQLVariable for defaults.@NgComponent and read its signals in the template.The plugin registers itself for scanning via IGuiceScanModuleInclusions
(AngularGraphQLScanModule → com.jwebmp.angular.graphql). New client classes only need to live in a
module that is itself scanned; no extra registration per client.
When adding the plugin to a multi-module build, register it in:
JWebMP/bom/pom.xml dependency management (angular-graphql).JWebMP/plugins/angular-graphql).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub guicedee/ai-rules --plugin jwebmp-angular-graphql