This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const apolloTesting = require(`apollo-server-testing`) | |
const { | |
ApolloServer | |
} = require(`apollo-server-express`) | |
// see docs at: https://www.apollographql.com/docs/apollo-server/getting-started/ | |
const serverConfig = { | |
/* | |
typeDefs, | |
resolvers, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addFile: async (_, options) => { | |
const { | |
file, | |
input | |
} = options; | |
try { | |
const { stream, filename, mimetype } = await file; | |
const s3File = await someFileStoreService.upload({ stream, filename, mimetype }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const apolloTesting = require(`apollo-server-testing`); | |
const { | |
ApolloServer | |
} = require(`apollo-server-express`); | |
// see docs at: https://www.apollographql.com/docs/apollo-server/getting-started/ | |
const serverConfig = { | |
/* | |
typeDefs, | |
resolvers, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
ApolloClient, | |
ApolloLink, | |
InMemoryCache, | |
HttpLink, | |
} from 'apollo-boost' | |
const isServer = () => typeof window === `undefined` | |
const create = (initialState = {}, cookies) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
ApolloClient, | |
ApolloLink, | |
InMemoryCache, | |
HttpLink | |
} from 'apollo-boost' | |
import fetch from 'isomorphic-unfetch' | |
const isServer = () => typeof window === `undefined` |