Skip to content

Latest commit

 

History

History
34 lines (18 loc) · 2.91 KB

PostgraphileChallenge.md

File metadata and controls

34 lines (18 loc) · 2.91 KB

PostGraphile Backend Code challenge

This challenge gets you familiar with Postgraphile, a GraphQL/Postgres database connector written in NodeJs. Postgraphile generates a GraphQL schema from introspecting a database and resolves queries directly against the database in a single SQL statement. From there it can be expanded and customized either with simple tag markup in the database, or fully extended with custom GraphQL resolvers.

The following guides provide a good starting point to understand the framework further:

https://www.graphile.org/postgraphile/quick-start-guide/ https://www.graphile.org/postgraphile/usage-library/#http-middleware

The challenge

The challenge is to design and implement a simple Meetings system for creating and managing attendees to a meeting. You should first design and implement a basic data model using PSQL and expose this API using Postgraphile.

The user should be able to create meetings with 1+ participants and store basic information about a Meeting (for example the date of the meeting, a simple title and agenda, and maybe a Zoom or MSTeam's URL for virtual meetings). It should be able to store and reference the people who are attending the Meeting and allow participants to fetch their meetings. More advanced role access or user login isn't required.

First steps

After setting up a Postgres server and installing NodeJs, define your schema and experiment with the API already generated by Postgraphile.

You may initially choose to run the Postgraphile server in CLI mode, but a more expandable option would be to run the framework direct from a node file in 'library mode' https://www.graphile.org/postgraphile/usage-library/. This will also give you more flexibility to expand the schema if you wish.

Next steps

From here, you can choose how to expand the functionality of the API in different ways (note these are only ideas on next steps, you can choose differently);

  • You may wish to filter out past meetings, so users can easily get their next meeting without being cluttered with past meetings.

  • You may want to improve the meetings data model to allow 'recurring meetings' that occur every week/month. You could choose to implement this using custom resolvers, database triggers, or a simple 'recurMeeting' mutation that creates a new meeting in the series automatically.

  • You could allow participants to accept or confirm their attendance.

  • For a more complex challenge you could provide a separate iCal feed for the user to add their appointments into Outlook or another calendar tool. This would require you to go beyond Postgraphile/GraphQL to access the database from your node API on an iCal endpoint.

  • You could also choose to integrate with Zoom, Google Meet, or Teams more directly, creating a meeting link dynamically instead of storing the URL.