@apollo/client#MutationOptions TypeScript Examples

The following examples show how to use @apollo/client#MutationOptions. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CGraphQLClient.ts    From Cromwell with MIT License 6 votes vote down vote up
/**
     * Make a custom mutation via ApolloClient
     * @param path query name. Used to return data, if it's not provided
     * ApolloQueryResult will be returned
     */
    public async mutate(options: MutationOptions, path?: string) {
        await this.checkUrl();

        const res = await this.handleError(() => this.apolloClient.mutate(options))
        if (path) return this.returnData(res, path);
        return res;
    }
Example #2
Source File: CGraphQLClient.ts    From Cromwell with MIT License 5 votes vote down vote up
public async mutate<T = any>(options: MutationOptions, path: string): Promise<T>;
Example #3
Source File: CGraphQLClient.ts    From Cromwell with MIT License 5 votes vote down vote up
public async mutate<T = any>(options: MutationOptions): Promise<ReturnType<ApolloClient<T>['mutate']>>;