Skip to content

Instantly share code, notes, and snippets.

View piuccio's full-sized avatar
:octocat:
Time for a change

Fabio Crisci piuccio

:octocat:
Time for a change
View GitHub Profile
{
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2019
},
"env": {
"node": true,
"es6": true
},
"overrides": [{
language: node_js
node_js:
- '8'
- '10'
cache: npm
@piuccio
piuccio / index.js
Created April 10, 2019 07:03
Sample server from apollo-server documentation
const { ApolloServer, gql } = require('apollo-server');
// This is a (sample) collection of books we'll be able to query
// the GraphQL server for. A more complete example might fetch
// from an existing data source like a REST API or database.
const books = [
{
title: 'Harry Potter and the Chamber of Secrets',
author: 'J.K. Rowling',
},
@piuccio
piuccio / config.js
Last active November 16, 2020 15:05
Shared code to run local apollo server next to firebase functions
const gql = require('graphql-tag');
const { makeExecutableSchema } = require('graphql-tools');
const books = [
// ...
];
const typeDefs = gql`
# ...
`;
@piuccio
piuccio / .firebaserc
Created April 10, 2019 07:14
Initialaze a Firebase project for Apollo server
{
"projects": {
"default": "the-id-of-your-project"
}
}