New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

graphi

Package Overview
Dependencies
Maintainers
3
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphi - npm Package Compare versions

Comparing version 9.0.2 to 9.1.0

2

example.js

@@ -19,3 +19,3 @@ 'use strict';

const getPerson = function (args, request) {
const getPerson = function(args, request) {
return new Promise((resolve) => {

@@ -22,0 +22,0 @@ resolve({ firstname: 'billy', lastname: 'jean' });

@@ -23,3 +23,3 @@ 'use strict';

exports.register = function (server, options) {
exports.register = function(server, options) {
const settings = Merge({}, internals.defaults, options);

@@ -86,3 +86,3 @@

internals.registerSchema = function ({ schema = {}, resolvers = {}, subscriptionOptions = {} }) {
internals.registerSchema = function({ schema = {}, resolvers = {}, subscriptionOptions = {} }) {
const server = this;

@@ -102,3 +102,3 @@ if (typeof schema === 'string') {

internals.onPreStart = function (server) {
internals.onPreStart = function(server) {
const resolver = ({ prefix = '', method = 'graphql' }) => {

@@ -140,3 +140,3 @@ return async (payload, request, ast) => {

internals.graphqlHandler = async function (request, h) {
internals.graphqlHandler = async function(request, h) {
if (request.method.toUpperCase() === 'OPTIONS') {

@@ -211,3 +211,12 @@ return h.continue;

const result = await Graphql.execute(schema, queryAST, resolvers, request, variables, operationName, fieldResolver);
const result = await Graphql.execute({
schema,
document: queryAST,
rootValue: resolvers,
contextValue: request,
variableValues: variables,
operationName,
fieldResolver
});
if (result.errors) {

@@ -233,3 +242,3 @@ const formatError = request.server.plugins.graphi.settings.formatError;

internals.graphiqlHandler = function (request, h) {
internals.graphiqlHandler = function(request, h) {
const { settings } = request.server.plugins.graphi;

@@ -248,3 +257,3 @@ const query = request.query;

internals.tryParseVariables = function (input) {
internals.tryParseVariables = function(input) {
if (!input || typeof input !== 'string') {

@@ -251,0 +260,0 @@ return input;

@@ -56,3 +56,3 @@ 'use strict';

exports.registerSubscriptions = function (server, schema, options) {
exports.registerSubscriptions = function(server, schema, options) {
const fields = schema._subscriptionType.getFields();

@@ -75,4 +75,4 @@ const fieldKeys = Object.keys(fields);

exports.publish = function (server) {
return function (name, obj) {
exports.publish = function(server) {
return function(name, obj) {
const schema = this.schema;

@@ -96,3 +96,3 @@

internals.wrapResolve = function (resolve) {
internals.wrapResolve = function(resolve) {
return (root, args, request) => {

@@ -99,0 +99,0 @@ const preResolve = this;

{
"name": "graphi",
"version": "9.0.2",
"version": "9.1.0",
"description": "hapi graphql plugin",

@@ -28,17 +28,17 @@ "main": "lib",

"devDependencies": {
"belly-button": "7.x.x",
"belly-button": "8.x.x",
"cb-barrier": "1.x.x",
"@hapi/code": "8.x.x",
"@hapi/eslint-plugin": "5.x.x",
"@hapi/hapi": "20.x.x",
"@hapi/code": "9.x.x",
"@hapi/eslint-plugin": "6.x.x",
"@hapi/hapi": "21.x.x",
"hapi-auth-bearer-token": "8.x.x",
"@hapi/lab": "24.x.x",
"@hapi/nes": "12.x.x",
"@hapi/lab": "25.x.x",
"@hapi/nes": "13.x.x",
"opentracing": "0.14.x",
"traci": "3.x.x",
"@hapi/wreck": "17.x.x"
"@hapi/wreck": "18.x.x"
},
"dependencies": {
"@hapi/boom": "9.x.x",
"graphql": "15.x.x",
"@hapi/boom": "10.x.x",
"graphql": "16.6.x",
"apollo-server-module-graphiql": "1.4.x",

@@ -45,0 +45,0 @@ "lodash.merge": "4.6.x"

@@ -49,3 +49,3 @@ 'use strict';

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('tom');

@@ -82,3 +82,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('tom');

@@ -130,3 +130,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -361,3 +361,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('tom');

@@ -400,3 +400,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -447,3 +447,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -487,3 +487,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('tom');

@@ -526,3 +526,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -566,3 +566,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('tom');

@@ -607,3 +607,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -672,3 +672,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -679,3 +679,3 @@ expect(request.path).to.equal('/graphql');

const createPerson = function (args, request) {
const createPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -719,3 +719,3 @@ expect(args.lastname).to.equal('jean');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -770,3 +770,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -819,3 +819,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -867,3 +867,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -918,3 +918,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -951,3 +951,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('tom');

@@ -983,3 +983,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('tom');

@@ -1015,3 +1015,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
const error = new Error('my silly error');

@@ -1026,3 +1026,3 @@ error.id = 'my id';

const formatError = function (error) {
const formatError = function(error) {
expect(error.originalError.message).to.equal('my silly error');

@@ -1058,3 +1058,3 @@ expect(error.originalError.id).to.equal('my id');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('tom');

@@ -1089,3 +1089,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('tom');

@@ -1122,3 +1122,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('tom');

@@ -1155,3 +1155,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
return Promise.resolve({ firstname: 'billy', lastname: 'jean' });

@@ -1185,3 +1185,3 @@ };

const getPerson = function (args, request) {
const getPerson = function(args, request) {
return Promise.resolve({ firstname: 'billy', lastname: 'jean' });

@@ -1215,3 +1215,3 @@ };

const getPerson = function (args, request) {
const getPerson = function(args, request) {
return Promise.resolve({ firstname: 'billy', lastname: 'jean' });

@@ -1245,3 +1245,3 @@ };

const getFriends = function (args, request) {
const getFriends = function(args, request) {
expect(args.firstname).to.equal('michael');

@@ -1252,3 +1252,3 @@

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -1291,3 +1291,3 @@ expect(request.path).to.equal('/graphql');

const getFriends = function (args, request) {
const getFriends = function(args, request) {
expect(args.firstname).to.equal('michael');

@@ -1298,3 +1298,3 @@

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -1337,3 +1337,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -1369,3 +1369,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -1402,3 +1402,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -1444,3 +1444,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -1486,3 +1486,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -1528,3 +1528,3 @@ expect(request.path).to.equal('/graphql');

const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -1656,3 +1656,3 @@ expect(request.path).to.equal('/graphql');

it('will overwrite an existing schema', async () => {
const getPerson = function (args, request) {
const getPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -1663,3 +1663,3 @@ expect(request.path).to.equal('/graphql');

const createPerson = function (args, request) {
const createPerson = function(args, request) {
expect(args.firstname).to.equal('billy');

@@ -1724,3 +1724,3 @@ expect(args.lastname).to.equal('jean');

it('will register a new schema', async () => {
const getPeople = function (args, request) {
const getPeople = function(args, request) {
return [{ firstname: 'billy', lastname: 'jean' }];

@@ -1770,3 +1770,3 @@ };

description: 'register hapi-auth-bearer-token strategy.',
register: function (server, options) {
register: function(server, options) {
server.auth.strategy('test', 'bearer-access-token', {

@@ -1773,0 +1773,0 @@ validate: defaultValidateFunc

@@ -133,7 +133,7 @@ 'use strict';

Person: {
firstname: function (root, args, request) {
firstname: function(root, args, request) {
expect(this.fu).to.equal('bar');
return root.firstname.toUpperCase();
},
lastname: function (root, args, request) {
lastname: function(root, args, request) {
expect(this.fu).to.equal('bar');

@@ -181,3 +181,3 @@ return root.lastname.toUpperCase();

description: 'An ISO 8601 formatted date string',
serialize (value) {
serialize(value) {
return 'baz';

@@ -184,0 +184,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc