Interface ApolloMutationCall.Factory

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <D extends com.apollographql.apollo.api.Operation.Data,​T,​V extends com.apollographql.apollo.api.Operation.Variables>
      ApolloMutationCall<T>
      mutate​(com.apollographql.apollo.api.Mutation<D,​T,​V> mutation)
      Creates and prepares a new ApolloMutationCall call.
      <D extends com.apollographql.apollo.api.Operation.Data,​T,​V extends com.apollographql.apollo.api.Operation.Variables>
      ApolloMutationCall<T>
      mutate​(com.apollographql.apollo.api.Mutation<D,​T,​V> mutation, D withOptimisticUpdates)
      Creates and prepares a new ApolloMutationCall call with optimistic updates.
    • Method Detail

      • mutate

        <D extends com.apollographql.apollo.api.Operation.Data,​T,​V extends com.apollographql.apollo.api.Operation.Variables> ApolloMutationCall<T> mutate​(@NotNull
                                                                                                                                                                      com.apollographql.apollo.api.Mutation<D,​T,​V> mutation)
        Creates and prepares a new ApolloMutationCall call.
        Parameters:
        mutation - the Mutation which needs to be performed
        Returns:
        prepared ApolloMutationCall call to be executed at some point in the future
      • mutate

        <D extends com.apollographql.apollo.api.Operation.Data,​T,​V extends com.apollographql.apollo.api.Operation.Variables> ApolloMutationCall<T> mutate​(@NotNull
                                                                                                                                                                      com.apollographql.apollo.api.Mutation<D,​T,​V> mutation,
                                                                                                                                                                      @NotNull
                                                                                                                                                                      D withOptimisticUpdates)

        Creates and prepares a new ApolloMutationCall call with optimistic updates.

        Provided optimistic updates will be stored in ApolloStore immediately before mutation execution. Any ApolloQueryWatcher dependent on the changed cache records will be re-fetched.
        Parameters:
        mutation - the Mutation which needs to be performed
        withOptimisticUpdates - optimistic updates for this mutation
        Returns:
        prepared ApolloMutationCall call to be executed at some point in the future