mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Add GraphQL logo and fix lint issues
This commit is contained in:
@@ -12,6 +12,7 @@ export class GraphQL implements INodeType {
|
|||||||
description: INodeTypeDescription = {
|
description: INodeTypeDescription = {
|
||||||
displayName: 'GraphQL',
|
displayName: 'GraphQL',
|
||||||
name: 'graphql',
|
name: 'graphql',
|
||||||
|
icon: 'file:graphql.png',
|
||||||
group: ['input'],
|
group: ['input'],
|
||||||
version: 1,
|
version: 1,
|
||||||
description: 'Makes a GraphQL request and returns the received data',
|
description: 'Makes a GraphQL request and returns the received data',
|
||||||
@@ -29,11 +30,11 @@ export class GraphQL implements INodeType {
|
|||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
name: 'GET',
|
name: 'GET',
|
||||||
value: 'GET'
|
value: 'GET',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'POST',
|
name: 'POST',
|
||||||
value: 'POST'
|
value: 'POST',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: 'POST',
|
default: 'POST',
|
||||||
@@ -63,17 +64,17 @@ export class GraphQL implements INodeType {
|
|||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
name: 'GraphQL (raw)',
|
name: 'GraphQL (raw)',
|
||||||
value: 'graphql'
|
value: 'graphql',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'JSON',
|
name: 'JSON',
|
||||||
value: 'json'
|
value: 'json',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
requestMethod: [
|
requestMethod: [
|
||||||
"POST"
|
'POST',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -97,10 +98,10 @@ export class GraphQL implements INodeType {
|
|||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
requestFormat: [
|
requestFormat: [
|
||||||
"json"
|
'json',
|
||||||
],
|
],
|
||||||
requestMethod: [
|
requestMethod: [
|
||||||
"POST"
|
'POST',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -114,10 +115,10 @@ export class GraphQL implements INodeType {
|
|||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
requestFormat: [
|
requestFormat: [
|
||||||
"json"
|
'json',
|
||||||
],
|
],
|
||||||
requestMethod: [
|
requestMethod: [
|
||||||
"POST"
|
'POST',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -129,11 +130,11 @@ export class GraphQL implements INodeType {
|
|||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
name: 'JSON',
|
name: 'JSON',
|
||||||
value: 'json'
|
value: 'json',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'String',
|
name: 'String',
|
||||||
value: 'string'
|
value: 'string',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: 'json',
|
default: 'json',
|
||||||
@@ -193,14 +194,14 @@ export class GraphQL implements INodeType {
|
|||||||
variables: this.getNodeParameter('variables', itemIndex, {}) as object,
|
variables: this.getNodeParameter('variables', itemIndex, {}) as object,
|
||||||
operationName: this.getNodeParameter('operationName', itemIndex, null) as string,
|
operationName: this.getNodeParameter('operationName', itemIndex, null) as string,
|
||||||
};
|
};
|
||||||
if (typeof requestOptions.body.variables === "string") {
|
if (typeof requestOptions.body.variables === 'string') {
|
||||||
try {
|
try {
|
||||||
requestOptions.body.variables = JSON.parse(requestOptions.body.variables)
|
requestOptions.body.variables = JSON.parse(requestOptions.body.variables);
|
||||||
} catch {
|
} catch {
|
||||||
requestOptions.body.variables = {};
|
requestOptions.body.variables = {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (requestOptions.body.operationName === "") {
|
if (requestOptions.body.operationName === '') {
|
||||||
requestOptions.body.operation = null;
|
requestOptions.body.operation = null;
|
||||||
}
|
}
|
||||||
requestOptions.json = true;
|
requestOptions.json = true;
|
||||||
|
|||||||
BIN
packages/nodes-base/nodes/GraphQL/graphql.png
Normal file
BIN
packages/nodes-base/nodes/GraphQL/graphql.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Reference in New Issue
Block a user