Template repository to use the API, used in this example to send emails and synchronize the list of users.
This code use NodeJS, queries are in
SQLandGraphQL
@01-edu/apito use our graphQL APIbetter-sqlite3to use a local databasenodemailerto send emails
all the environement variable are centralized in config.js
DOMAINdomain of the school to queryZ01_TOKENmore info in how to get your read-only access token on @01-edu/api documentationMAIL_USERnodemailer userMAIL_PASSnodemailer password
We used a declarative approach, queries should be written either in
.sqland.graphqlfiles. The matching functions will be generated so you can use them.
Used directory is z01/queries name of the file will be used to name the exposed function.
Used directory is sqlite/queries exactly like graphql queries, name of the file will be used to name the exposed function.