Ben Kraft and GitHub
700392315a
Enable golangci-lint ( #49 )
...
## Summary:
It would be nice to have some linting beyond `go vet`! Now we do. I
started by copying the config from Khan/webapp. I did remove a couple
of staticcheck checks that I didn't feel were useful. (Note also that
exportloopref is the replacement for scopelint in newer golangci-lint.)
Included are all the needed lint fixes; most are stylistic but the
changes in the example are a (minor) bugfix.
Fixes #22 .
Issue: https://github.com/Khan/genqlient/issues/22
## Test plan:
make check
Author: benjaminjkraft
Reviewers: aberkan, dnerdy, benjaminjkraft, csilvers, MiguelCastillo
Required Reviewers:
Approved by: aberkan, dnerdy
Checks: ✅ Test (1.17), ✅ Test (1.16), ✅ Test (1.15), ✅ Test (1.14), ✅ Test (1.13), ✅ Lint, ✅ Test (1.17), ✅ Test (1.16), ✅ Test (1.15), ✅ Test (1.14), ✅ Test (1.13), ✅ Lint
Pull request URL: https://github.com/Khan/genqlient/pull/49
2021-08-20 10:39:12 -07:00
Ben Kraft
c2e7dc4e5b
Handle omitempty correctly for slices
...
We were generating broken code; fixes #43 . Also fixes a bug where
applying omitempty to the entire query was broken by e597cac74c .
2021-06-01 15:49:42 -07:00
Ben Kraft
caa72dae6a
Remove line numbers from export-operations file, again
...
I messed it up in 6adfe3b2377! This shows it's really time to turn on
more linters, which would have caught this.
2021-05-03 11:16:13 -07:00
Ben Kraft
6adfe3b237
Remove line numbers from export-operations file
...
This was sort of accidental from putting them in line numbers, and it
turns out it's more annoying than useful. Easy enough to remove.
Fixes #40 .
2021-04-23 18:14:09 -07:00
Ben Kraft
b399e0d740
move TODOs into issues
2021-04-21 19:05:38 -07:00
Ben Kraft
2c087c7821
big overhaul of error-formatting, to get positions more consistently
...
fixes #2
2021-04-15 17:01:46 -07:00
Ben Kraft
e597cac74c
add option to force using a pointer
2021-04-12 16:01:21 -07:00
Ben Kraft
16523c1f81
add omitempty
2021-04-09 11:51:30 -07:00
Ben Kraft
25a2b45ccc
redo comment parsing to set up for field-level config
2021-04-09 09:53:53 -07:00
Ben Kraft
b4e8316c6a
add support for custom scalars -- mainly adding proper import machinery
2021-04-08 13:07:31 -07:00
Ben Kraft
b8f922a41b
err explicitly if there's no operation name
2021-04-07 17:18:03 -07:00
Ben Kraft
334c186944
error if you try to use features that aren't done (fragments/interfaces)
2021-04-02 16:19:50 -07:00
Ben Kraft
edb12e3e0a
pretty-print JSON in query-export
2021-04-02 16:01:52 -07:00
Ben Kraft
4b06c94eed
put config-file-relative paths in exported queries (and error messages)
2021-04-01 16:51:00 -07:00
Ben Kraft
9fe8f09e8c
more miscellaneous fixes while integrating into webapp
2021-04-01 15:04:36 -07:00
Ben Kraft
fbf00f3bef
add option to export all operations
2021-04-01 13:11:23 -07:00
Ben Kraft
27ee3c2dbd
fixes while integrating into webapp
2021-03-30 17:53:31 -07:00
Ben Kraft
17a95fd4de
more TODOs, and especially clarify the situation for input type names
2021-03-22 18:45:52 -07:00
Ben Kraft
a42c9b8166
clean up various TODOs and comments
2021-03-22 18:11:51 -07:00
Ben Kraft
cf7136ca65
total rewrite to interface handling; not complete but it compiles
2020-07-16 13:28:43 -07:00
Ben Kraft
af4a765a32
back out interfaces/unions, in preparation for new approach
2020-07-16 09:53:21 -07:00
Ben Kraft
a023cfb0cf
basic support for fragments
2020-07-15 17:35:47 -07:00
Ben Kraft
5042a9a549
allow omitting context
2020-05-01 18:45:39 -07:00
Ben Kraft
7ab06dfd30
add support for enums
2020-04-10 18:16:32 -07:00
Ben Kraft
9510470937
add support for non-scalar inputs
2020-04-10 17:02:18 -07:00
Ben Kraft
b600df7877
big refactor to put the codegen onto methods of an object
2020-04-10 15:21:23 -07:00
Ben Kraft
dfea9bf128
push type-name into types.go
2020-04-10 14:30:56 -07:00
Ben Kraft
d039587b39
pass errors a few more places
2020-04-02 18:22:07 -07:00
Ben Kraft
af5d1bd542
lowercase for arguments
2020-03-27 18:01:56 -07:00
Ben Kraft
9e01efdd88
Actually configure package name
2020-03-27 17:45:29 -07:00
Ben Kraft
01b903b053
Doc comments
2020-03-27 17:44:30 -07:00
Ben Kraft
9074926cea
Set up a test
2020-03-27 15:57:22 -07:00
Ben Kraft
0dcd124c8e
fix filenames, set up go generate
2020-02-06 18:52:00 -08:00
Ben Kraft
c19f62c2c7
non-ridiculous handling of scalars
2020-01-17 18:23:29 -05:00
Ben Kraft
bf5d04939e
WIP on config
2020-01-03 11:02:31 -08:00
Ben Kraft
0bce896722
break up Generate
2020-01-02 18:48:29 -08:00
Ben Kraft
9746c818fd
genql: quick hack at variables
2020-01-02 17:52:55 -08:00
Ben Kraft
77670363d3
genql: minor cleanups
2020-01-02 16:40:47 -08:00
Ben Kraft
4d880a701e
move a bunch of the logic from generated into client
2019-12-25 16:26:32 -05:00
Ben Kraft
4a2134c533
add some TODOs
2019-12-23 23:26:51 -05:00
Ben Kraft
e8b5ccbcda
generates something mostly plausiblegit add .
2019-12-23 23:22:19 -05:00
Ben Kraft
7a20e2ae74
fill out the easy parts of the codegen
2019-12-23 21:07:07 -05:00
Ben Kraft
efa9ccd122
add basic query struct, support 1.12
2019-12-23 19:35:38 -05:00
Ben Kraft
a23b0e3756
sketches of generated graphql client
2019-12-21 00:03:19 -05:00