Commit Graph

10 Commits

Author SHA1 Message Date
Lucien Cartier-Tilet c5f5e770e2
Fix word name collision, add two new user-related features
continuous-integration/drone/push Build is passing Details
This commit changes the primary key of words to a serial number. That
way, two words with the same normalized value will not collide with
one another.

It also adds two new tables in the database:
- Users following languages
- Users learning words

The former can represent two stages of learning a word:
- Either the user is currently learning it
- Or they consider they know it and don’t need to work on it anymore

These two new tables now have their API query available through the
GraphQL API.

This commit also fixes the issue of word-related tables and types not
being dropped when resetting the database.
2023-01-18 10:26:45 +01:00
Lucien Cartier-Tilet b5dfdee453
Remove panics, cleaner code
continuous-integration/drone/push Build is passing Details
2023-01-17 01:52:56 +01:00
Lucien Cartier-Tilet 1eb31f8e1e
Convert format macros to new format 2023-01-17 01:52:31 +01:00
Lucien Cartier-Tilet dcaa920c51
Better error handling 2023-01-16 00:22:58 +01:00
Lucien Cartier-Tilet b20fb5f079
Fragment graphql module, add Appwrite vars to context 2023-01-15 17:36:32 +01:00
Lucien Cartier-Tilet 5c199e2628
Change Serials to UUIDs, fix translation table
Languages now refer to other languages they are translated to through
an additional table rather than an array of identifiers. This ensures
no orphan identifier remains when a language is deleted.

The primary key of languages is now a unique identifier rather than
the name of the language itself. It now allows for multiple languages
to have the same name. Their unique identifier is now a v4 UUID.

Set Diesel to specific version 2.0.2, since 2.0 apparently does not
mean the latest version of 2.0.z and 2.0 has issues with its uuid
feature.

Cleanup and simplify some code.

Some more GraphQL documentation on available queries.
2023-01-08 15:58:26 +01:00
Lucien Cartier-Tilet ecd8f58542
Plenty of GraphQL query implementation
Implement query for languages, words, initial implementation for user
query
2023-01-04 22:16:48 +01:00
Lucien Cartier-Tilet 8d5e523ab3
Initial GraphQL API sort of working 2023-01-04 19:33:29 +01:00
Lucien Cartier-Tilet a2a2863d62
Add CORS and authorized origins to server 2023-01-04 14:42:55 +01:00
Lucien Cartier-Tilet 60988cff24
Make Rust models for database schema 2023-01-03 16:11:43 +01:00