Explore Phi
Search
⌃K
Comment on page
🦖

Example Call

We are providing an example of using Apollo Client

$ npm install @apollo/client graphql
You can create the ApolloClient which you then use for all public API queries like:
const query = `
query query($address: String!) {
conditionCheck(input: { address: $address }) {
data {
Condition
Result
TokenId
Value
}
}
}
`;
​
export const queryExample = async (address: string) => {
const response = await apolloClient.query({
query: gql(query),
variables: {
address: address,
},
});
console.log('example data: ', response.data.conditionCheck.data[0]);
};
​