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

Move all command inside redis query #25

Open
raitucarp opened this issue May 30, 2020 · 3 comments
Open

Move all command inside redis query #25

raitucarp opened this issue May 30, 2020 · 3 comments

Comments

@raitucarp
Copy link
Member

Better to move all of the redis-commands inside query, mutation, or subscritions inside redis scope like such this:

query {
    redis {
        a: _get(key: "a")
    }
}
@raitucarp
Copy link
Member Author

alternative:

{
  _ {
    a: get(key: "a")
  }
}

@raitucarp
Copy link
Member Author

example response:

{
  "data": {
    "_": {
      "a": "test"
    }
  }
}

@raitucarp
Copy link
Member Author

destructuring of data:

const { data : { _ : { a } } } = response

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

No branches or pull requests

1 participant