【发布时间】:2020-10-23 02:44:21
【问题描述】:
我正在请求 Salesforce 架构数据。它有一个格式
res = {
Id: { name, type, label },
IsDeleted: { type, name, label },
MasterRecordId: { type, name, label },
...and so on
}
因此,字段是动态的。 在 queries.js 中我试图描述它
export const GET_SALESFORCE_FIELDS = gql`
query SalesforceFields {
salesforceFields @rest(endpoint: "schemaservice", type: "SalesforceFields", path: "/fields") {
// What should be here??
}
}
`;
`
如何描述动态部分?
我没有任何架构文件或解析器。只有query.js(用于使用useQuery 的进一步请求)和client.js(定义了new ApolloClient)
"@apollo/client": "^3.0.0-rc.10",
"apollo-link-rest": "^0.8.0-beta.0"
【问题讨论】:
标签: graphql apollo-client apollo-link-rest