How to use apollo-server-restify - 2 common examples

To help you get started, we’ve selected a few apollo-server-restify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github intuit / saloon / server / graphqlApi.js View on Github external
if (parentEntity) {
          parentEntity.menuitemIds.push(entity.id);
        }
        return entity;
      },
    },
  };

  const schema = makeExecutableSchema({
    typeDefs: [QuerySchema, MutationSchema, MenuSchema, MenuItemSchema],
    resolvers,
  });
  const graphQLOptions = { schema };

  server.post('/graphql', graphqlRestify(graphQLOptions));
  server.get('/graphql', graphqlRestify(graphQLOptions));
}
github intuit / saloon / server / graphqlApi.js View on Github external
const parentEntity = menus.find(tmp => parseInt(menuId, 10) === parseInt(tmp.id, 10));
        if (parentEntity) {
          parentEntity.menuitemIds.push(entity.id);
        }
        return entity;
      },
    },
  };

  const schema = makeExecutableSchema({
    typeDefs: [QuerySchema, MutationSchema, MenuSchema, MenuItemSchema],
    resolvers,
  });
  const graphQLOptions = { schema };

  server.post('/graphql', graphqlRestify(graphQLOptions));
  server.get('/graphql', graphqlRestify(graphQLOptions));
}

apollo-server-restify

Production-ready Node.js GraphQL server for Restify

MIT
Latest version published 6 years ago

Package Health Score

67 / 100
Full package analysis

Popular apollo-server-restify functions