1
Fork 0
mirror of https://github.com/Airsequel/AirGQL.git synced 2025-10-05 17:30:41 +02:00
Commit graph

25 commits

Author SHA1 Message Date
2ee5152d54 Implement querying by PK
- 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
2024-11-14 18:01:55 +01:00
8febe6be43 Implement introspection for by_pk queries
- 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...
2024-11-14 18:01:55 +01:00
8894f14002 Detect primary key constraints properly
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.
2024-11-14 18:01:55 +01:00
ccf518c9eb Make introspection work with new graphiql verison 2024-11-14 18:01:55 +01:00
41a459fe09 Update graphiql & implement simpler introspection system 2024-11-14 18:01:55 +01:00
81018cd481 Fix typo 2024-10-01 02:39:50 +02:00
5394fcd9bc Explain what the "database or disk is full" error means to the user 2024-10-01 02:30:47 +02:00
faf63f0c6d Fix "database or disk is full" errors 2024-10-01 02:30:47 +02:00
d3378c7ecd Ensure sql names are always quoted properly 2024-10-01 02:02:19 +02:00
0d52017745 Add backend tests for reference following 2024-10-01 01:09:46 +02:00
cb0127ddd1 Implement main reference following mechanism on the backend 2024-10-01 01:09:46 +02:00
5372e9253c Add "goto reference" icon to frontend 2024-10-01 01:09:46 +02:00
449d6c84ff Bump sqlite parser 2024-09-04 23:26:40 +02:00
e8de9440e2 Expose sql query handler to fix tests 2024-07-25 00:49:08 +02:00
4350c1f539 Do not allow WITHOUT ROWID columns
PR: 
2024-07-21 00:16:34 +02:00
529573b675 Mark non-null gql query output fields as such 2024-07-20 21:58:05 +00:00
Adrian Sieber
94556eaca5 Improve wording 2024-07-10 23:18:40 +02:00
84a6c44abf Remove sql => gql blob conversion 2024-07-09 19:24:41 +02:00
f4323b661b Fix BLOB display in query tab 2024-07-09 19:18:02 +02:00
ad679d32ca Fix tests after previous change 2024-05-27 14:18:20 +02:00
3cef611c85 Mark primary keys as UNIQUE 2024-05-27 12:56:07 +02:00
6cf584e58a Mark omittable fields as optional in introspection. 2024-05-27 12:42:05 +02:00
51bf1ebd4d Tweak introspection to reflect previous change 2024-05-04 00:27:26 +02:00
1cfe5a937e Do not allow returning from mutations with writeonly token 2024-05-04 00:13:15 +02:00
Adrian Sieber
fbee31a849 AirGQL: Clean up documentation, remove obsolete references to Airsequel 2024-05-03 08:39:25 +00:00