Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surface `karma' via GraphQL API #69

Merged
merged 6 commits into from Mar 19, 2019
Merged

Surface `karma' via GraphQL API #69

merged 6 commits into from Mar 19, 2019

Conversation

jcorrado
Copy link
Contributor

@jcorrado jcorrado commented Mar 8, 2019

ref: #70

@jcorrado jcorrado changed the title Surface karma as attribute of user obj. Shows user provenance issue. Surface karma via GraphQL API Mar 8, 2019
@devth
Copy link
Member

devth commented Mar 12, 2019

@jcorrado lgtm - is this ready or is there remaining work?

@jcorrado
Copy link
Contributor Author

@devth I was planning to add some of the karma reporting aggregates we discussed, before calling this PR good to go. That being said, if you wanted to merge this tiny bit in to get something up in GQL, that's fine with me - I can cut another branch to work on the aggregates. Your call, please.

@devth
Copy link
Member

devth commented Mar 12, 2019

I'm fine waiting. Just wanted to make sure you weren't blocked on me reviewing/merging.

@jcorrado jcorrado marked this pull request as ready for review March 19, 2019 02:07
@jcorrado jcorrado requested a review from devth March 19, 2019 02:08
@jcorrado
Copy link
Contributor Author

Back to you for review, @devth.

Copy link
Member

@devth devth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 just one tiny comment. Looking fwd to modeling users!

src/yetibot/core/webapp/resolvers.clj Outdated Show resolved Hide resolved
@jcorrado
Copy link
Contributor Author

For future reference:

~/projects/yetibot/yetibot.core karma-in-graphql-api
❯ curl -s 'http://localhost:3003/graphql' \
     -H 'Accept: application/json' \
     --data 'query={karmas{user_id, score}}' \
     --compressed | jq .
{
  "data": {
    "karmas": [
      {
        "user_id": "@U3CTLM3DX",
        "score": 2
      },
      {
        "user_id": "jung",
        "score": 1
      }
    ]
  }
}

@jcorrado jcorrado changed the title Surface karma via GraphQL API Surface `karma' via GraphQL API Mar 19, 2019
@jcorrado jcorrado merged commit 72c4eed into master Mar 19, 2019
@devth devth removed the in progress label Mar 19, 2019
@jcorrado jcorrado deleted the karma-in-graphql-api branch March 19, 2019 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants