Socket
Socket
Sign inDemoInstall

@replit/clui-gql

Package Overview
Dependencies
Maintainers
6
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@replit/clui-gql - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

3

dist/index.js

@@ -57,2 +57,5 @@ "use strict";

}
else if (n.kind === 'ENUM' && n.name) {
parts = __spread(start, [n.name], parts);
}
}

@@ -59,0 +62,0 @@ return "$" + inputValue.name + ": " + parts.join('');

2

package.json
{
"name": "@replit/clui-gql",
"version": "0.0.1",
"version": "0.0.2",
"description": "A utility to transform GraphQL introspection type into a CLUI command",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -30,3 +30,4 @@ export type Maybe<T> = T | null;

tomorrow?: Maybe<Scalars['Boolean']>,
today: Scalars['Boolean']
today: Scalars['Boolean'],
status?: Maybe<Status>
};

@@ -33,0 +34,0 @@

@@ -44,21 +44,20 @@ // @ts-nocheck

describe('toOperation', () => {
it('..', async () => {
const data = await query<__Type>({ name: 'Cli' });
const field = data.__type.fields.find(
(f: { name: string }) => f.name === 'weather',
);
test('toOperation', async () => {
const data = await query<__Type>({ name: 'Cli' });
const field = data.__type.fields.find(
(f: { name: string }) => f.name === 'weather',
);
const output = 'services { name }';
const res = toOperation({
path: ['cli', field.name],
field,
output: () => ({ fields: output }),
});
const output = 'services { name }';
const res = toOperation({
path: ['cli', field.name],
field,
output: () => ({ fields: output }),
});
/* eslint-disable max-len */
expect(res)
.toEqual(`query Query($zipcode: String!, $view: String, $count: Int, $time: Float, $days: [String], $hours: [Int], $minutes: [Float!]!, $tomorrow: Boolean, $today: Boolean!) {
/* eslint-disable max-len */
expect(res)
.toEqual(`query Query($zipcode: String!, $view: String, $count: Int, $time: Float, $days: [String], $hours: [Int], $minutes: [Float!]!, $tomorrow: Boolean, $today: Boolean!, $status: STATUS) {
cli {
weather(zipcode: $zipcode, view: $view, count: $count, time: $time, days: $days, hours: $hours, minutes: $minutes, tomorrow: $tomorrow, today: $today) {
weather(zipcode: $zipcode, view: $view, count: $count, time: $time, days: $days, hours: $hours, minutes: $minutes, tomorrow: $tomorrow, today: $today, status: $status) {
${output}

@@ -68,4 +67,3 @@ }

}`);
/* eslint-enable max-len */
});
/* eslint-enable max-len */
});

@@ -28,2 +28,5 @@ import { __InputValue, __Type, __Field } from './graphqlTypes';

parts = [...start, n.name, ...parts];
} else if (n.kind === 'ENUM' && n.name) {
// TODO convert enum values to options
parts = [...start, n.name, ...parts];
}

@@ -30,0 +33,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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