This repository was archived by the owner on Sep 3, 2021. It is now read-only.
File tree 8 files changed +260
-258
lines changed
8 files changed +260
-258
lines changed Original file line number Diff line number Diff line change @@ -1490,7 +1490,7 @@ export const processFilterArgument = ({
1490
1490
: undefined ;
1491
1491
const filterParamKey =
1492
1492
paramIndex > 1 ? `${ paramIndex - 1 } _${ argumentName } ` : argumentName ;
1493
- const filterCypherParam = `$${ filterParamKey } ` ;
1493
+ const filterCypherParam = `$\` ${ filterParamKey } \` ` ;
1494
1494
let translations = [ ] ;
1495
1495
// allows an exception for the existence of the filter argument AST
1496
1496
// if isFederatedOperation
@@ -2969,9 +2969,9 @@ export const translateListArguments = ({
2969
2969
const paramIndex = indexedParam . index ;
2970
2970
const field = schemaType . getFields ( ) [ argumentName ] ;
2971
2971
const listVariable = `${ safeVariableName } .${ safeVar ( argumentName ) } ` ;
2972
- let paramPath = `$${ argumentName } ` ;
2972
+ let paramPath = `$\` ${ argumentName } \` ` ;
2973
2973
// Possibly use the already generated index used when naming nested parameters
2974
- if ( paramIndex >= 1 ) paramPath = `$${ paramIndex } _${ argumentName } ` ;
2974
+ if ( paramIndex >= 1 ) paramPath = `$\` ${ paramIndex } _${ argumentName } \` ` ;
2975
2975
let translation = '' ;
2976
2976
if ( field ) {
2977
2977
// list argument matches the name of a field
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ export function cypherDirectiveArgs(
146
146
federatedOperationParams [ e ] === undefined
147
147
) {
148
148
// Use only if value exists
149
- args . push ( `${ e } : $${ paramIndex } _${ e } ` ) ;
149
+ args . push ( `${ e } : $\` ${ paramIndex } _${ e } \` ` ) ;
150
150
}
151
151
} ) ;
152
152
// Return the comma separated join of all param
@@ -306,11 +306,13 @@ export function innerFilterParams(
306
306
export function paramsToString ( params , cypherParams ) {
307
307
if ( params . length > 0 ) {
308
308
const strings = _ . map ( params , param => {
309
- return `${ param . key } :${ param . paramKey ? `$${ param . paramKey } .` : '$' } ${
309
+ return `${ param . key } :${
310
+ param . paramKey ? `$\`${ param . paramKey } \`.` : '$`'
311
+ } ${
310
312
! param . value || typeof param . value . index === 'undefined'
311
313
? param . key
312
314
: `${ param . value . index } _${ param . key } `
313
- } `;
315
+ } \` `;
314
316
} ) ;
315
317
return `{${ strings . join ( ', ' ) } ${
316
318
cypherParams ? `, cypherParams: $cypherParams}` : '}'
You can’t perform that action at this time.
0 commit comments