I’m building a shipping platform that needs to programmatically create webhook subscriptions for multiple Shopify stores using the GraphQL Admin API. I’m running into an issue with the webhookSubscriptionCreate mutation and need help understanding the correct approach.
The Problem:
When trying to create an HTTP webhook subscription, I’m experiencing a disconnect between the working GraphQL mutation and the generated Java classes from the schema.
What Works: This mutation executes successfully against the 2025-07 API:
mutation RegisterWebhook(
$topic: WebhookSubscriptionTopic!
$webhookSubscription: WebhookSubscriptionInput!
) {
webhookSubscriptionCreate(topic: $topic, webhookSubscription: $webhookSubscription) {
webhookSubscription {
id
topic
endpoint {
__typename
... on WebhookHttpEndpoint { callbackUrl }
}
}
userErrors { field message }
}
}
What Doesn’t Work: However, when I generate Java classes from the schema using graphql-maven-plugin 3.0.1, the WebhookSubscriptionInput class only contains these fields:
format: WebhookSubscriptionFormatincludeFields: [String!]filter: StringmetafieldNamespaces: [String!]metafields: [HasMetafieldsMetafieldIdentifierInput!
There’s no callbackUrl field or endpoint configuration in the generated input class.
My Questions:
-
How can the mutation work successfully if the
WebhookSubscriptionInputdoesn’t contain endpoint/callback URL fields in the schema? -
Is there a discrepancy between the actual API behavior and the published schema for 2025-07?
-
How should I properly pass the callback URL when using the generated Java classes - is there a missing input type or parameter I should be using?
Questions for the Community:
-
Has anyone successfully created HTTP webhook subscriptions using GraphQL?
-
Am I missing something obvious about the GraphQL mutation structure?
Technical Context:
-
API Version: 2025-07
-
Use Case: Multi-tenant SaaS platform managing webhooks for multiple stores
-
Framework: Spring Boot 3.5
-
GraphQL Client: graphql-maven-plugin 3.0.1 with generated client classes
-
Integration: Java with the following plugin configuration:
<plugin>
<groupId>com.graphql-java-generator</groupId>
<artifactId>graphql-maven-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<packageName>com.kuryo.core.shopify.app.client.graphql.generated</packageName>
<typePrefix>Shopify</typePrefix>
<separateUtilityClasses>true</separateUtilityClasses>
<generateDeprecatedRequestResponse>true</generateDeprecatedRequestResponse>
<!-- Custom scalars for all Shopify types (ARN, BigInt, Date, etc.) -->
</configuration>
</plugin>
Thanks for any help!