cleodora-forecasting / cleodora-forecasting/cleodora

Exercise 3: Add a new GraphQL query to return your name and display it in cleoc

Open
#148 0 comments 0 reactions 0 assignees View on GitHub
good first issue new-contributor
Dominant language
Go
Stars
24
Forks
1
PR merge metrics
No merged PRs in 30d

Description

This issue is an optional task for new contributors.

* Implement what is suggested
* Submit a pull request to get it reviewed and improvement suggestions made
* Write a "I did it!" comment in this issue when you are done so we can celebrate with you

Of course the pull request will end up being rejected because it's only an exercise, but you'll get a lightweight introduction to some project internals.

If you have questions you can post comments in this issue. Once they have been resolved all comments except the ones for _cheering_ will be deleted to keep the issue clean for future new contributors.

This issue will never be closed.

# Exercise

Modify the graphql.schema to include a new type `User` which has just a name and a new query `me` that returns a single user.

Execute `make generate` to update some code automatically based on the schema changes. If you don't have `make` installed (i.e. you are on Window) you can look inside the `Makefile` and execute the commands listed under `generate` manually.

Modify `cleosrv` to implement that query and return a single user with your name.

Implement a `cleoc` subcommand `cleoc who-am-i` that prints the user it got from `cleosrv`.

Contributor guide

Open the contributing guide

Research direction

Start by reading graphql.schema and the generate target in Makefile, then run make generate after the schema changes. Inspect cleosrv to implement the new query and cleoc to add the who-am-i subcommand. Done means cleoc who-am-i prints the user name returned by cleosrv.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, graphql
Domain
api, cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.