File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
force-app/main/default/classes Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 11public class GraphQLNode {
2- public String name ;
3- public Boolean typeFrament ; // transforms to "...on {NAME } {"
2+ public String id ;
3+ public Boolean typeFrament ; // transforms to "...on {id } {"
44 public GraphQLArgument arg ; // not sure this supports all use cases... might need to be GraphQLArgument | GraphQLArgument[]
55 public Object [] children ; // object or other nodes
66
7- public GraphQLNode (String name ){
7+ public GraphQLNode (String id ){
88 this .typeFrament = false ;
99 this .children = new Object []{};
10- this .name = name ;
10+ this .id = id ;
11+ }
12+
13+ // returns the current node
14+ public GraphQLNode setId (String id ){
15+ this .id = id ;
16+ return this ;
1117 }
1218
1319 // returns the current node
@@ -32,9 +38,9 @@ public class GraphQLNode {
3238 }
3339
3440 private string buildInner (){
35- String qry = this .name ;
41+ String qry = this .id ;
3642 if (this .typeFrament ){
37- qry = ' ... on ' + this .name ;
43+ qry = ' ... on ' + this .id ;
3844 }
3945
4046 if (this .arg != null ){
You can’t perform that action at this time.
0 commit comments