📜  没有组件的 apollo 客户端突变 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:43.646000             🧑  作者: Mango

代码示例1
// react-apollo includes two HOCs called graphql() and withApollo() that can be used to accomplish this.
// This example takes the withApollo() HOC approach

import React, { Component } from "react";
import { DO_MUTATION } from "./mutations";
import { withApollo } from "react-apollo";

import SomeLibrary from "SomeLibrary";

export class MyComponent extends Component {
    render() {
        return (