allow map[string]interface{}, and other such things, as scalars
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
unknown name "bogus"; expected a builtin or path/to/package.Name
|
||||
invalid type-name "bogus" (unknown type-name "bogus"); expected a builtin, path/to/package.Name, interface{}, or a slice, map, or pointer of those
|
||||
+1
-1
@@ -1 +1 @@
|
||||
unknown name "bogus"; expected a builtin or path/to/package.Name
|
||||
invalid type-name "bogus" (unknown type-name "bogus"); expected a builtin, path/to/package.Name, interface{}, or a slice, map, or pointer of those
|
||||
+1
-1
@@ -1 +1 @@
|
||||
query EmptyInterface { getJunk }
|
||||
query EmptyInterface { getJunk getComplexJunk }
|
||||
|
||||
+3
-1
@@ -7,7 +7,8 @@ import (
|
||||
)
|
||||
|
||||
type EmptyInterfaceResponse struct {
|
||||
GetJunk interface{} `json:"getJunk"`
|
||||
GetJunk interface{} `json:"getJunk"`
|
||||
GetComplexJunk []map[string]*[]*map[string]interface{} `json:"getComplexJunk"`
|
||||
}
|
||||
|
||||
func EmptyInterface(
|
||||
@@ -20,6 +21,7 @@ func EmptyInterface(
|
||||
`
|
||||
query EmptyInterface {
|
||||
getJunk
|
||||
getComplexJunk
|
||||
}
|
||||
`,
|
||||
&retval,
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"operations": [
|
||||
{
|
||||
"operationName": "EmptyInterface",
|
||||
"query": "\nquery EmptyInterface {\n\tgetJunk\n}\n",
|
||||
"query": "\nquery EmptyInterface {\n\tgetJunk\n\tgetComplexJunk\n}\n",
|
||||
"sourceLocation": "testdata/queries/EmptyInterface.graphql"
|
||||
}
|
||||
]
|
||||
|
||||
+2
-1
@@ -1,6 +1,6 @@
|
||||
scalar DateTime
|
||||
|
||||
scalar Junk
|
||||
scalar ComplexJunk
|
||||
|
||||
enum Role {
|
||||
STUDENT
|
||||
@@ -67,6 +67,7 @@ type Query {
|
||||
convert(dt: DateTime!, tz: String): DateTime!
|
||||
maybeConvert(dt: DateTime, tz: String): DateTime
|
||||
getJunk: Junk
|
||||
getComplexJunk: ComplexJunk
|
||||
listOfListsOfLists: [[[String!]!]!]!
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user