import axios from 'axios';
import { print } from 'graphql';
import gql from 'graphql-tag';
import apiUrl from '../config';
const GET_CANDY = gql`
query candy (
$name: String
) {
candy (
name: $name
) {
id
name
effects
}
}`;
axios({
method: 'post',
url: apiUrl,
data: {
query: print(GET_CANDY),
variables: {
name: candyNameFilter,
}
}
}).then(() => {
// ...
}