-
Notifications
You must be signed in to change notification settings - Fork 8
Using internal examples instead of remote ones #51
Comments
@snxk |
@ankithans you are right, I changed it to a working API and it works perfectly. Can the default graphql-link.yaml be changed to avoid the issues? |
@ankithans Amazing! Yes. API's come and go.
GraphQL-serve is done in node.js which will require an extra stack. |
@snxk This is why I asked to create the issue. I think design uses an internal folder but I would not actually make things internal here and let examples to reuse some of the elements: |
yeah @wtrocki, so we need to deploy an example graphql server (while using the above elements), right? |
we can have a graphql server with mock data on a Heroku free tier, as an example. |
no need to deploy. someone can run it on local machine. additional problem is that if your api doesnt work error message is not great: 2021/02/17 20:16:36 download failed: unexpected end of JSON input |
Okay, will work on the example first! |
Yep. This is good to learn golang as well. |
yes, will learn while implementing! |
This is the entire output when I try to run the main.go file.
❯ go run main.go serve --verbose
skipping Query.getSunDailyForecastByGeocode field respose, not an integer: default
skipping Query.getSunDailyForecastByLocation field respose, not an integer: default
2021/02/17 20:16:36 loaded previously stored schema: upstreams/anilist.graphql
2021/02/17 20:16:36 downloading schema for upstream pokemon: https://graphql-pokemon.now.sh
2021/02/17 20:16:36 download failed: unexpected end of JSON input
2021/02/17 20:16:36 loaded previously stored schema: upstreams/weather.graphql
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x9dfcfa]
goroutine 1 [running]:
github.com/aerogear/graphql-link/internal/gateway.getSelectedFields(0x0, 0xc001037140, 0xc001249170, 0x0, 0x0, 0xc000288188, 0x0, 0x1)
/home/snxk/Projects/graphql-link/internal/gateway/gateway.go:330 +0x3a
github.com/aerogear/graphql-link/internal/gateway.mount(0xc0001132d0, 0xc000282de0, 0xc000282c00, 0xc00029a320, 0xc000296288, 0x7, 0x0, 0x0, 0x0, 0x0, ...)
/home/snxk/Projects/graphql-link/internal/gateway/mount.go:81 +0xc9
github.com/aerogear/graphql-link/internal/gateway.actionRunner.mount(0xc0001132d0, 0xc000282de0, 0xc000282c00, 0xc00029a320, 0xc00028ca00, 0x0, 0x0)
/home/snxk/Projects/graphql-link/internal/gateway/mount.go:34 +0x19e
github.com/aerogear/graphql-link/internal/gateway.New(0xbc6db5, 0x1, 0xc0000cf630, 0x100, 0xc0002826f0, 0x0, 0xc000290300, 0x3, 0x3, 0x0, ...)
/home/snxk/Projects/graphql-link/internal/gateway/gateway.go:176 +0x826
github.com/aerogear/graphql-link/internal/cmd/serve.mountGatewayOnHttpServer(0xc000290400, 0xc, 0x13362a0)
/home/snxk/Projects/graphql-link/internal/cmd/serve/cmd.go:223 +0x7e
github.com/aerogear/graphql-link/internal/cmd/serve.startServer(0xc000290400, 0xc000290400, 0x0)
/home/snxk/Projects/graphql-link/internal/cmd/serve/cmd.go:198 +0x9f
github.com/aerogear/graphql-link/internal/cmd/serve.run(0x16e8420, 0xc000286100, 0x0, 0x1)
/home/snxk/Projects/graphql-link/internal/cmd/serve/cmd.go:80 +0xe5
github.com/spf13/cobra.(*Command).execute(0x16e8420, 0xc0002860f0, 0x1, 0x1, 0x16e8420, 0xc0002860f0)
/home/snxk/go/pkg/mod/github.com/spf13/[email protected]/command.go:846 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x16e8180, 0xa5d12a, 0x0, 0x16e86c0)
/home/snxk/go/pkg/mod/github.com/spf13/[email protected]/command.go:950 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
/home/snxk/go/pkg/mod/github.com/spf13/[email protected]/command.go:887
github.com/aerogear/graphql-link/internal/cmd/root.Main()
/home/snxk/Projects/graphql-link/internal/cmd/root/cmd.go:35 +0x3f
github.com/aerogear/graphql-link/internal/cmd.Main(...)
/home/snxk/Projects/graphql-link/internal/cmd/cmd.go:18
main.main()
/home/snxk/Projects/graphql-link/main.go:13 +0xad
exit status 2
The text was updated successfully, but these errors were encountered: