Skip to content

Duplicate variable names with 'variables' and others #4

@ash0080

Description

@ash0080

In test example,

methodArgs: {
    last: {__variable__: 'last'}
  },
variables: {
    last: ''
  },
types: {
    last: 'LAST'
  },

output: body: 'query test($last: LAST!) {\n    testMethod(last: $last, last: $last){\n    id\n\n  }\n  }',

don't know why passing a value in variables, it is useless. cuz variable's value is passed from outside of the graphql-tag, it only defines a name here. doc

actually, I don't think variables should be an object, It should be a keys array, cuz, it only define the variable types

so __variable__ is useless too, cuz we alway need define variable names with a named operation

now, the 'methodArgs', 'variables', 'types' design looks superfluous and not easy to use
maybe you should plan well

if keeping the variables still accept an object, I think the key:value <--- value should be an TYPE definition

I guess maybe you want the variable accept a default value? but seems it not work as expect

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions