Commit Graph

32 Commits

Author SHA1 Message Date
92aed98f90
Add Content-Type as authorized header
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is failing
2023-01-26 04:23:12 +01:00
c618bd9667
Add and remove words
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-24 03:51:31 +01:00
a624636939
Implement more mutations
Implement mutations:
- create language
- delete language
- user follows a language
- user unfollows a language
- new word

Context's user_auth now contains either the user's ID or nothing if
not authentificated.
2023-01-24 01:05:18 +01:00
51f0fc3108
Remove last unwrap from ordabok
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-18 11:31:34 +01:00
233ea7c416
Add method to get user’s followers
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-18 11:21:34 +01:00
4faaaf244d
Clarify GraphQL following methods on user
Remove `following` and replace it with `usersFollowed` and
`languagesFollowed`
2023-01-18 11:21:03 +01:00
c5f5e770e2
Fix word name collision, add two new user-related features
All checks were successful
continuous-integration/drone/push Build is passing
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
b5dfdee453
Remove panics, cleaner code
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-17 01:52:56 +01:00
1eb31f8e1e
Convert format macros to new format 2023-01-17 01:52:31 +01:00
19ba3a750b
Update README
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-17 01:29:13 +01:00
cea8c5a7fe
Fix GraphQL API error messages
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-17 01:00:36 +01:00
a36fd740af
Even more error handling
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-17 00:58:01 +01:00
3220f5c005
Add user, language, word lookup
Also add some error management
2023-01-17 00:40:53 +01:00
d0a40b7ed8
Almost no unwraps !
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-16 00:48:09 +01:00
dcaa920c51
Better error handling 2023-01-16 00:22:58 +01:00
425e00acc1
Manually add users to database, better handling of errors in API
All checks were successful
continuous-integration/drone/push Build is passing
Also manually remove users from database, and list them only as admin
2023-01-16 00:09:50 +01:00
8c62727ec9
Add ADMIN_KEY variable to context 2023-01-15 22:51:22 +01:00
e522f358e5
Change mutation to quickly test if a user is connected or not 2023-01-15 22:50:48 +01:00
05ca82c4e1
Move context to new file, add to context if user is authentified
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-15 18:10:51 +01:00
b20fb5f079
Fragment graphql module, add Appwrite vars to context 2023-01-15 17:36:32 +01:00
34e28384ce
Add Drone CI
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-08 17:42:56 +01:00
2026a2ddc6
Fix incorrect function 2023-01-08 16:51:13 +01:00
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
eb48924761
Add description for GraphQL query 2023-01-05 12:15:07 +01:00
ecd8f58542
Plenty of GraphQL query implementation
Implement query for languages, words, initial implementation for user
query
2023-01-04 22:16:48 +01:00
c0b0a53061
Gitea complaining about ambiguous characters 2023-01-04 19:33:29 +01:00
8d5e523ab3
Initial GraphQL API sort of working 2023-01-04 19:33:29 +01:00
a2a2863d62
Add CORS and authorized origins to server 2023-01-04 14:42:55 +01:00
57bc676ec1
Add .editorconfig file 2023-01-03 16:24:40 +01:00
50d55ed480
Add license and README 2023-01-03 16:20:31 +01:00
60988cff24
Make Rust models for database schema 2023-01-03 16:11:43 +01:00
a9e300ede2
Initial commit with basic DB layout 2023-01-03 15:16:10 +01:00