This repository was archived by the owner on Sep 3, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +260
-258
lines changed Expand file tree Collapse file tree 8 files changed +260
-258
lines changed Original file line number Diff line number Diff line change @@ -1490,7 +1490,7 @@ export const processFilterArgument = ({
14901490 : undefined ;
14911491 const filterParamKey =
14921492 paramIndex > 1 ? `${ paramIndex - 1 } _${ argumentName } ` : argumentName ;
1493- const filterCypherParam = `$${ filterParamKey } ` ;
1493+ const filterCypherParam = `$\` ${ filterParamKey } \` ` ;
14941494 let translations = [ ] ;
14951495 // allows an exception for the existence of the filter argument AST
14961496 // if isFederatedOperation
@@ -2969,9 +2969,9 @@ export const translateListArguments = ({
29692969 const paramIndex = indexedParam . index ;
29702970 const field = schemaType . getFields ( ) [ argumentName ] ;
29712971 const listVariable = `${ safeVariableName } .${ safeVar ( argumentName ) } ` ;
2972- let paramPath = `$${ argumentName } ` ;
2972+ let paramPath = `$\` ${ argumentName } \` ` ;
29732973 // 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 } \` ` ;
29752975 let translation = '' ;
29762976 if ( field ) {
29772977 // 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(
146146 federatedOperationParams [ e ] === undefined
147147 ) {
148148 // Use only if value exists
149- args . push ( `${ e } : $${ paramIndex } _${ e } ` ) ;
149+ args . push ( `${ e } : $\` ${ paramIndex } _${ e } \` ` ) ;
150150 }
151151 } ) ;
152152 // Return the comma separated join of all param
@@ -306,11 +306,13 @@ export function innerFilterParams(
306306export function paramsToString ( params , cypherParams ) {
307307 if ( params . length > 0 ) {
308308 const strings = _ . map ( params , param => {
309- return `${ param . key } :${ param . paramKey ? `$${ param . paramKey } .` : '$' } ${
309+ return `${ param . key } :${
310+ param . paramKey ? `$\`${ param . paramKey } \`.` : '$`'
311+ } ${
310312 ! param . value || typeof param . value . index === 'undefined'
311313 ? param . key
312314 : `${ param . value . index } _${ param . key } `
313- } `;
315+ } \` `;
314316 } ) ;
315317 return `{${ strings . join ( ', ' ) } ${
316318 cypherParams ? `, cypherParams: $cypherParams}` : '}'
You can’t perform that action at this time.
0 commit comments