Skip to content

Releases: quizfreely/api

v1.2 - Folders, Subjects, Saved Studysets, & Better DevOps Automation Stuff

29 Oct 01:38

Choose a tag to compare

v1.2.0 adds folders and saved studysets so users can organize their studysets better, adds subjects to filter/organize & query public studysets better (which also replaces search queries), fixes deployment/devops scripts/stuff so now everything "just works" (DB and API-server) when deploying to production, and fixes a minor bug where Google OAuth full names were labelled as emails (very inconsequential and easily resolved issue, and because of our improved devops stuff, existing data "just works"/gets fixed with our automated database migration thingy using dbmate).

Quizfreely API v1.1 - Practice Tests & Detailed Progress Tracking

17 Sep 00:26

Choose a tag to compare

Quizfreely API v1.1 finally has practice tests with really detailed term progress/accuracy tracking and even things like tracking commonly confused terms or frequently selected incorrect answers.

Also, Quizfreely has nonprofit status now! Quizfreely is fiscally sponsored by The Hack Foundation, a 501(c)(3) nonprofit.
Quizfreely has transparent finances and you can donate 🥰

Unlike previous versions, the database updating process is really easy now since we just use dbmate with migration files in db/migrations/ and this is done automatically for our production deployment CI/CD script!

v1.0.1 - Minor Bugfix

13 Aug 22:13

Choose a tag to compare

This version just quickly fixes a small error where AuthMiddleware makes the server respond with an error even if the client is trying to access something that doesn't need authentication. Instead, errors should be thrown by each resolver/handler instead of the middleware. With GraphQL, the client can query multiple types of data; some resolvers might need authentication, others might be public.

(There are no database schema changes for this bugfix)

Quizfreely API v1 - Rewritten in Go/Golang

13 Aug 17:12

Choose a tag to compare

Quizfreely's API has been rewritten in Go/Golang. It's source code used to be in the same repository as Quizfreely's web app, quizfreely/quizfreely, but now has its own repository, quizfreely/api.

To update the database, there is now a folder, db/migrations/, with sql files to update the database for each version. To update the database tables & stuff, see db/migrations/v0.32.1-to-1.0.0.sql, which is also included below:

DROP VIEW public.profiles;

ALTER TABLE auth.users RENAME COLUMN oauth_google_id TO oauth_google_sub;
/* sub and id are conviently exactly the same (tested + fact checked) */

DROP POLICY select_users ON auth.users;
DROP POLICY insert_useres ON auth.users;
DROP POLICY select_users ON auth.users;
DROP POLICY insert_users ON auth.users;
DROP POLICY update_users ON auth.users;
DROP POLICY delete_users ON auth.users;
DROP POLICY select_sessions ON auth.sessions;
DROP POLICY insert_sessions ON auth.sessions;
DROP POLICY update_sessions ON auth.sessions;
DROP POLICY delete_sessions ON auth.sessions;
DROP POLICY select_studysets ON studysets;
DROP POLICY insert_studysets ON studysets;
DROP POLICY update_studysets ON studysets;
DROP POLICY delete_studysets ON studysets;
DROP POLICY select_studyset_progress ON studyset_progress;
DROP POLICY insert_studyset_progress ON studyset_progress;
DROP POLICY update_studyset_progress ON studyset_progress;
DROP POLICY delete_studyset_progress ON studyset_progress;
DROP POLICY select_studyset_settings ON studyset_settings;
DROP POLICY insert_studyset_settings ON studyset_settings;
DROP POLICY update_studyset_settings ON studyset_settings;
DROP POLICY delete_studyset_settings ON studyset_settings;
DROP POLICY select_users_eh_classes ON auth.users;
DROP POLICY select_sessions_eh_classes ON auth.sessions;

ALTER TABLE auth.users DISABLE ROW LEVEL SECURITY;
ALTER TABLE auth.sessions DISABLE ROW LEVEL SECURITY;
ALTER TABLE public.studysets DISABLE ROW LEVEL SECURITY;
ALTER TABLE public.studyset_progress DISABLE ROW LEVEL SECURITY;
ALTER TABLE public.search_queries DISABLE ROW LEVEL SECURITY;
ALTER TABLE public.studyset_settings DISABLE ROW LEVEL SECURITY;

ALTER TYPE auth_type_enum RENAME VALUE 'username_password' TO 'USERNAME_PASSWORD';
ALTER TYPE auth_type_enum RENAME VALUE 'oauth_google' TO 'OAUTH_GOOGLE';