21 Commits

Author SHA1 Message Date
Joao P Dubas
3c97b33d93 [day-04] configure crudry middleware to handle errors 2021-06-26 17:28:17 +00:00
Joao P Dubas
179bd7f85d [day-04] add crudry to handle absinthe errors 2021-06-26 17:26:53 +00:00
Joao P Dubas
58c4601203 [day-04] add exercise schema
So a training is a collection of exercises that have a description and a
protocol to be followed.
2021-06-26 17:26:14 +00:00
Joao P Dubas
ea5616addf [day-04] add training schema
With this we can represent a traning program for a user.
2021-06-26 17:25:53 +00:00
Joao P Dubas
96a3e2e9f0 [day-03] add mutation to create user
1. Add input type to receive user details
2. Add resolver to create user
3. Configure mutation in root type
4. Aggregate mutations in schema
2021-06-24 00:25:47 +00:00
Joao P Dubas
a54d29ee61 [day-03] configure router to expose graphql
Expose graphql schema through absinthe plug. Also expose graphiql
interface to make it easier to test graphql schema.
2021-06-24 00:23:34 +00:00
Joao P Dubas
1380b8b2e4 [day-03] create schema to aggregate root fields
Expose root query in graphql schema.
2021-06-24 00:22:12 +00:00
Joao P Dubas
b7cbcbd51f [day-03] create root type to define queries
Expose the query to get a specific user.
2021-06-24 00:20:13 +00:00
Joao P Dubas
289901b0c9 [day-03] create resolver to fetch user
This resolver is required to create a graphql query to get users.
2021-06-24 00:17:53 +00:00
Joao P Dubas
425c3eafc2 [day-03] expose id in user schema
Use uuid custom scalar to represent the user id.
2021-06-24 00:12:17 +00:00
Joao P Dubas
c5612f9398 [day-03] create custom scalar for uuid
Graphql doesn't support uuid natively. So, we must create a custom
scalar to handle this type.
2021-06-24 00:10:17 +00:00
Joao P Dubas
8787973075 [day-03] create user schema
Add user type to represent entity in graphql.
2021-06-24 00:09:54 +00:00
Joao P Dubas
b543e241b0 [day-03] enable absinthe formatter 2021-06-24 00:04:19 +00:00
Joao P Dubas
424bfa917e [day-03] install absinthe dependency
Yeah, it's time to work with graphql in elixir.
2021-06-24 00:03:34 +00:00
Joao P Dubas
3709cd265a [day-02] add context to create/get a user
Create context module to create and fetch a user.
2021-06-22 23:57:10 +00:00
Joao P Dubas
d578bc6cf3 [day-02] validate user input
Also improve migration to reflect requirements in validation done
through `Ecto.Changeset`.
2021-06-22 23:56:07 +00:00
Joao P Dubas
97af827bc2 [day-02] add user schema and migration
Add elixir struct to represent an user and its corresponding
representation on the database.
2021-06-22 23:55:02 +00:00
Joao P Dubas
cebce7da42 [day-02] configure repo to use uuid type as id 2021-06-22 23:50:52 +00:00
Joao P Dubas
fc73f30dd0 [day-01] setup imc calc and route 2021-06-22 01:56:40 +00:00
Joao P Dubas
8658384030 [day-01] phoenix project setup
Create new phoenix project
2021-06-22 01:55:16 +00:00
Joao P Dubas
f02c0ff310 [day-00] base infra for the project 2021-06-22 01:52:43 +00:00