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
SQL
andGraphQL
@01-edu/api
to use our graphQL API@hubspot/api-client
to connect to hubspotbetter-sqlite3
to use a local database
all the environement variable are centralized in config.js
DOMAIN
domain of the school to queryZ01_TOKEN
more info in how to get your read-only access token on @01-edu/api documentationHUBSPOT_TOKEN
an api token from hubspot
We used a declarative approach, queries should be written either in
.sql
and.graphql
files. 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.