如何使用片段?因为我的代码没有片段
但是有片段,我得到204无内容响应。它在Apollo 3客户端上与o Apollo Boost不同吗?
import React, { useState, useMemo, Fragment } from 'react';
import { toast } from 'react-toastify';
import { useQuery, useMutation, gql } from '@apollo/client';
const USER_INFO = gql`
fragment userInfo on User {
_id
name
username
email
images {
url
public_id
}
about
createdAt
updatedAt
}
`;
const PROFILE = gql`
query {
profile {
...userInfo
}
}
${USER_INFO}
`;
const USER_UPDATE = gql`
mutation userUpdate($input: UserUpdateInput!) {
userUpdate(input: $input) {
...userInfo
}
}
${USER_INFO}
`;