Skip to content

Commit

Permalink
fix: invalid requird types in introspection response
Browse files Browse the repository at this point in the history
  • Loading branch information
dosco committed Feb 23, 2021
1 parent 24b95cf commit bf2439c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 6 additions & 6 deletions core/introspec.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,14 +345,14 @@ func (in *intro) addColumn(
})
obt.Fields = append(obt.Fields, &schema.InputValue{
Name: colName,
Type: &schema.NonNull{OfType: &schema.TypeName{Name: "OrderDirection"}},
Type: &schema.TypeName{Name: "OrderDirection"},
})

in.exptNeeded[typeName] = true

expt.Fields = append(expt.Fields, &schema.InputValue{
Name: colName,
Type: &schema.NonNull{OfType: &schema.TypeName{Name: typeName + "Expression"}},
Type: &schema.TypeName{Name: typeName + "Expression"},
})
}

Expand All @@ -364,8 +364,8 @@ func (in *intro) addArgs(
otName := &schema.TypeName{Name: ot.Name}
itName := &schema.TypeName{Name: it.Name}

potName := &schema.NonNull{OfType: &schema.List{OfType: &schema.NonNull{OfType: &schema.TypeName{Name: ot.Name}}}}
pitName := &schema.NonNull{OfType: &schema.List{OfType: &schema.NonNull{OfType: &schema.TypeName{Name: it.Name}}}}
potName := &schema.List{OfType: &schema.NonNull{OfType: &schema.TypeName{Name: ot.Name}}}
pitName := &schema.List{OfType: &schema.NonNull{OfType: &schema.TypeName{Name: it.Name}}}

args := schema.InputValueList{
&schema.InputValue{
Expand Down Expand Up @@ -495,10 +495,10 @@ func (in *intro) addExpressions() {
iv := &schema.InputValue{
Name: v.name,
Desc: schema.NewDescription(v.desc),
Type: &schema.NonNull{OfType: &schema.TypeName{Name: vtype}},
Type: &schema.TypeName{Name: vtype},
}
if v.list {
iv.Type = &schema.NonNull{OfType: &schema.List{OfType: iv.Type}}
iv.Type = &schema.List{OfType: iv.Type}
}
fields = append(fields, iv)
}
Expand Down
2 changes: 0 additions & 2 deletions internal/serv/web/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const fetcher = createGraphiQLFetcher({
});

const openLink = (url) => {
console.log("hello");
window.open(url, "_blank");
};

Expand Down Expand Up @@ -51,7 +50,6 @@ const App = () => {

const handleEditQuery = (query) => {
setQuery(query);
console.log(">", query);
};

const handleToggleExplorer = () => setExplorerOpen(!explorerOpen);
Expand Down

0 comments on commit bf2439c

Please sign in to comment.