- I realised by PK querying doesn't need arguments like filter, limit or
offset, so I removed the argument name collision logic I added in the
last commit
- I implemented the actual logic for querying by PK. The code is a lot
shorter due to the new introspection system
- I moved the normal queries to the new introspection system for
consistency.
- I moved the logic of "coerce columns without a datatype" away from the
resolver and into the "sql -> gql" converter as to be able to reuse the
default introspection resolver which simply looks up fields into the
parent resolver's result.
- I added some comments documenting the Introspection.Resolver stuff and
it's behaviour
- Make column names containing "_by_pk" disallowed on the client side (I
technically already did that on the server side with the previous
commit, but this makes it nicer)
- Implement the actual introspection logic
- If a primary key has a "reserved" argument name (i.e. a name we use
for built in airsequel arguments) like "filter" or "limit", then we
rename that to pk from <name> to <name>_. This might technically still
create collisions in the rare case where both <name> and <name>_ are
columns that are part of the same primary key, but I don't think that
matters in practice. The hasura playground doesn't seem to do any
renaming (I tried it in the playground), so we could also not do that at
all I guess...
So far we were going off the primary_key flag given to us by sqlite, but
this flag is only set to true for one column when using multi-column
primary keys.
Moreover, this commit also implements a `isRowid` property on
`ColumnEntry`, which is both there for convenience, and to reuse the
"proper" (i.e., taking into account rowid columns named _rowid_) rowid
detection logic.