I'm requesting a Salesforce schema data. It has a format
res = {
Id: { name, type, label },
IsDeleted: { type, name, label },
MasterRecordId: { type, name, label },
...and so on
}
So, fields are dynamic. In queries.js I'm trying to describe it
export const GET_SALESFORCE_FIELDS = gql`
query SalesforceFields {
salesforceFields @rest(endpoint: "schemaservice", type: "SalesforceFields", path: "/fields") {
// What should be here??
}
}
`;
`
How can I describe the dynamic part?
I don't have any schema files or resolvers. Only queries.js (for further requests with useQuery) and client.js (where the new ApolloClient
is defined)
"@apollo/client": "^3.0.0-rc.10",
"apollo-link-rest": "^0.8.0-beta.0"