Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
{
title: 'The Hobbit',
author: 'J. R. R. Tolkien',
},
],
quote: () =>
'The future is something which everyone reaches at the rate of sixty minutes an hour, whatever he does, whoever he is. β C.S. Lewis',
},
};
const server = new ApolloServer({
// IMPORTANT: Include directive type definitions for both @burstRateLimit and @sustainedRateLimit
typeDefs: [
createRateLimitTypeDef('burstRateLimit'),
createRateLimitTypeDef('sustainedRateLimit'),
typeDefs,
],
resolvers,
schemaDirectives: {
// IMPORTANT: Include directive implementations (directive name is determined by the key)
burstRateLimit: createRateLimitDirective(),
sustainedRateLimit: createRateLimitDirective(),
},
});
server
.listen()
.then(({ url }) => {
console.log(`π Server ready at ${url}`);
})
.catch(error => {
console.error(error);
author: 'George R. R. Martin',
},
{
title: 'The Hobbit',
author: 'J. R. R. Tolkien',
},
],
quote: () =>
'The future is something which everyone reaches at the rate of sixty minutes an hour, whatever he does, whoever he is. β C.S. Lewis',
},
};
const server = new ApolloServer({
// IMPORTANT: Include directive type definitions for both @burstRateLimit and @sustainedRateLimit
typeDefs: [
createRateLimitTypeDef('burstRateLimit'),
createRateLimitTypeDef('sustainedRateLimit'),
typeDefs,
],
resolvers,
schemaDirectives: {
// IMPORTANT: Include directive implementations (directive name is determined by the key)
burstRateLimit: createRateLimitDirective(),
sustainedRateLimit: createRateLimitDirective(),
},
});
server
.listen()
.then(({ url }) => {
console.log(`π Server ready at ${url}`);
})
.catch(error => {