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

39 commits

Author SHA1 Message Date
c8a5e17f25 Implement _by_pk updates/deletes 2024-11-19 21:30:43 +01:00
4ce69aaefa Add introspection for _by_pk mutations 2024-11-19 19:18:47 +01:00
064248785e Remove another comment 2024-11-15 17:22:24 +01:00
6bae78311d Remove some unused stuff & some debugging lines 2024-11-15 17:04:17 +01:00
9088c8fd05 Remove commented out code from graphiql playground component
Also make it so `_by_pk` is only disallowed as a table suffix, not infix
2024-11-15 16:14:34 +01:00
768b711a6f Add tests for _by_pk queries 2024-11-15 14:34:36 +01:00
9cebb6dc2d Migrate all gql code to share types with introspection 2024-11-14 18:04:10 +01:00
4318c70053 Fix all tests! 2024-11-14 18:03:24 +01:00
67b37aabc5 Add basic directive support to introspection system 2024-11-14 18:03:23 +01:00
3322705709 Fix nullity of fields in update gql query 2024-11-14 18:03:23 +01:00
562214db98 Fix (most) introspection airgql tests
The only one that's still failing is one related to directives, which I
will fix in another commit soon(ish)
2024-11-14 18:03:08 +01:00
346a0e017c Split off introspection tests into their own file 2024-11-14 18:01:56 +01:00
c5fbeee8bd Add docs to standard graphql types 2024-11-14 18:01:56 +01:00
c161fbd288 Do not allow views to be mutated 2024-11-14 18:01:56 +01:00
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