-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix for wrong graphql type when using custom scalars in gqlgen
- Loading branch information
1 parent
b04cd12
commit 66c3f47
Showing
3 changed files
with
53 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// testing really need more improvements! | ||
// Please add more tests if you use this | ||
|
||
package gqlgen_sqlboiler | ||
|
||
import "testing" | ||
|
||
func TestShortType(t *testing.T) { | ||
testShortType(t, "gitlab.com/decicify/app/backend/graphql_models.FlowWhere", "FlowWhere") | ||
testShortType(t, "*gitlab.com/decicify/app/backend/graphql_models.FlowWhere", "*FlowWhere") | ||
testShortType(t, "*string", "*string") | ||
testShortType(t, "string", "string") | ||
testShortType(t, "*time.Time", "*time.Time") | ||
} | ||
|
||
func testShortType(t *testing.T, input, output string) { | ||
result := getShortType(input) | ||
if result != output { | ||
t.Errorf("%v should result in %v but did result in %v", input, output, result) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters