import ApolloClient from 'apollo-client';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { editorSchema as typeDefs } from '../schema';
import { resolvers } from '../resolvers';

const defaultSchema = `
type Query {
    dummy: Int
}
type Mutation {
    dummy: Int
}
`;

const cache = new InMemoryCache();


const client = new ApolloClient({
    queryDeduplication: true,
    // dataIdFromObject: (result) => modules.getDataIdFromObject(result),
    typeDefs: defaultSchema.concat(typeDefs),
    resolvers,
    cache,
});

export {
    client,
};



