Skip to content

Commit

Permalink
fix(api): Add missing JvmStatic annotations (#2823)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Creaser <mattwcc@amazon.com>
  • Loading branch information
tylerjroach and mattcreaser committed May 17, 2024
1 parent f29d7b7 commit d8fd864
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aws-api/api/aws-api.api
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,13 @@ public final class com/amplifyframework/api/graphql/model/ModelQuery {

public final class com/amplifyframework/api/graphql/model/ModelSubscription {
public static final field INSTANCE Lcom/amplifyframework/api/graphql/model/ModelSubscription;
public final fun of (Ljava/lang/Class;Lcom/amplifyframework/api/graphql/SubscriptionType;)Lcom/amplifyframework/api/graphql/GraphQLRequest;
public final fun of (Ljava/lang/Class;Lcom/amplifyframework/api/graphql/SubscriptionType;Lkotlin/jvm/functions/Function1;)Lcom/amplifyframework/api/graphql/GraphQLRequest;
public static final fun of (Ljava/lang/Class;Lcom/amplifyframework/api/graphql/SubscriptionType;)Lcom/amplifyframework/api/graphql/GraphQLRequest;
public static final fun of (Ljava/lang/Class;Lcom/amplifyframework/api/graphql/SubscriptionType;Lkotlin/jvm/functions/Function1;)Lcom/amplifyframework/api/graphql/GraphQLRequest;
public static final fun onCreate (Ljava/lang/Class;)Lcom/amplifyframework/api/graphql/GraphQLRequest;
public static final fun onCreate (Ljava/lang/Class;Lkotlin/jvm/functions/Function1;)Lcom/amplifyframework/api/graphql/GraphQLRequest;
public final fun onDelete (Ljava/lang/Class;)Lcom/amplifyframework/api/graphql/GraphQLRequest;
public static final fun onDelete (Ljava/lang/Class;)Lcom/amplifyframework/api/graphql/GraphQLRequest;
public static final fun onDelete (Ljava/lang/Class;Lkotlin/jvm/functions/Function1;)Lcom/amplifyframework/api/graphql/GraphQLRequest;
public final fun onUpdate (Ljava/lang/Class;)Lcom/amplifyframework/api/graphql/GraphQLRequest;
public static final fun onUpdate (Ljava/lang/Class;)Lcom/amplifyframework/api/graphql/GraphQLRequest;
public static final fun onUpdate (Ljava/lang/Class;Lkotlin/jvm/functions/Function1;)Lcom/amplifyframework/api/graphql/GraphQLRequest;
}

Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ object ModelSubscription {
* @param <M> the concrete type of the model.
* @return a valid [GraphQLRequest] instance.
</M> */
@JvmStatic
fun <M : Model> of(
modelType: Class<M>,
type: SubscriptionType,
Expand All @@ -49,6 +50,7 @@ object ModelSubscription {
* @param <P> the concrete model path for the M model type
* @return a valid [GraphQLRequest] instance.
</M> */
@JvmStatic
fun <M : Model, P : ModelPath<M>> of(
modelType: Class<M>,
type: SubscriptionType,
Expand Down Expand Up @@ -93,6 +95,7 @@ object ModelSubscription {
* @return a valid [GraphQLRequest] instance.
* @see .of
</M> */
@JvmStatic
fun <M : Model> onDelete(modelType: Class<M>): GraphQLRequest<M> {
return of(modelType, SubscriptionType.ON_DELETE)
}
Expand Down Expand Up @@ -121,6 +124,7 @@ object ModelSubscription {
* @return a valid [GraphQLRequest] instance.
* @see .of
</M> */
@JvmStatic
fun <M : Model> onUpdate(modelType: Class<M>): GraphQLRequest<M> {
return of(modelType, SubscriptionType.ON_UPDATE)
}
Expand Down

0 comments on commit d8fd864

Please sign in to comment.