graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

Update query.mdx for boolean expresssions - close #9056

Open jerempy opened this issue 3 years ago • 4 comments
trafficstars

Update to show that columnexp and booleans with can use relationships. Also removed the anchors on headers so that the links will work close #9056

Description

The docs concerning the boolean expressions were dated and so didn't express that you could use relationships as part of your queries.

Changelog

Component : server

Type: bugfix

Product: community-edition

Short Changelog

Clarify docs for relationships as part of boolean expressions in queries

Long Changelog

Related Issues

Solution and Design

Steps to test and verify

Limitations, known bugs & workarounds

Server checklist

Catalog upgrade

Does this PR change Hasura Catalog version?

  • [x] No
  • [ ] Yes
    • [ ] Updated docs with SQL for downgrading the catalog

Metadata

Does this PR add a new Metadata feature?

  • [x] No
  • [ ] Yes
    • Does run_sql auto manages the new metadata through schema diffing?
      • [ ] Yes
      • [ ] Not required
    • Does run_sql auto manages the definitions of metadata on renaming?
      • [ ] Yes
      • [ ] Not required
    • Does export_metadata/replace_metadata supports the new metadata added?
      • [ ] Yes
      • [ ] Not required

GraphQL

  • [x] No new GraphQL schema is generated
  • [ ] New GraphQL schema is being generated:
    • [ ] New types and typenames are correlated

Breaking changes

  • [x] No Breaking changes

  • [ ] There are breaking changes:

    1. Metadata API

      Existing query types:

      • [ ] Modify args payload which is not backward compatible
      • [ ] Behavioural change of the API
      • [ ] Change in response JSON schema
      • [ ] Change in error code
    2. GraphQL API

      Schema Generation:

      • [ ] Change in any NamedType
      • [ ] Change in table field names

      Schema Resolve:-

      • [ ] Change in treatment of null value for any input fields
    3. Logging

      • [ ] Log JSON schema has changed
      • [ ] Log type names have changed

jerempy avatar Oct 12 '22 22:10 jerempy

Beep boop! :robot:

Hey @jerempy, thanks for your PR!

One of my human friends will review this PR and get back to you as soon as possible.

Stay awesome! :sunglasses:

hasura-bot avatar Oct 12 '22 22:10 hasura-bot

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 12 '22 22:10 CLAassistant

Thanks for the PR, @jerempy.

It seems that there are some syntax errors in the code, as the docs build is failing. Perhaps @seanparkross can help you out with that? I'm not too familiar with the syntax of the docs.

As for the changes from a semantic PoV, I'm not so sure. This PR seems to be changing WhereExp, rather than BoolExp. This brings the docs only marginally closer to what the server actually supports. For instance, what about where: {_not: {articles: {rating: {_gte: 4}}}}? This is supported by the server, but not by the docs after (or before) this PR.

abooij avatar Oct 17 '22 11:10 abooij

@abooij Thanks for the reply and insight! Makes sense. I took another shot at it. lemme know what you think.

jerempy avatar Oct 17 '22 19:10 jerempy

This new attempt adds a few helpful examples. That's good. However, it doesn't address #9056, because it doesn't change the grammar spelled out in the documentation - that is to say, it doesn't change BoolExp, ColumnExp, etc. There's something material missing in the actual grammar (namely the possibility to use relationships as part of boolean expressions), not just in the explanation.

@seanparkross could you please help trace down why the build of the docs isn't succeeding?

abooij avatar Oct 20 '22 18:10 abooij

@abooij, saw your comment via email. I pulled the branch and it ran fine locally. I went to the CI steps and scrolled down to find Cloudflare where it says deployed successfully. I don't know why the comment in the mono PR didn't update, but you can scroll down there to see the preview build URL.

image

robertjdominguez avatar Oct 20 '22 18:10 robertjdominguez

@abooij thanks for the insight and patience. I took another shot - 🤞 i got it

jerempy avatar Oct 20 '22 19:10 jerempy

@jerempy Thanks for the Hacktoberfest submission from the Docs team! We're going to have some swag coming your way soon.

In terms of moving forward on this PR we're going to loop back on it nearer the end of the month when our dev teams have more availability.

Thanks

seanparkross avatar Oct 21 '22 16:10 seanparkross

Hey! @jerempy

We'd love to send you some Hasura swag as a token of appreciation. Could you please send me an email to [email protected] with a reference of this PR so I can send you the swag form? ✨

Stefmore02 avatar Oct 21 '22 20:10 Stefmore02

Beep boop! :robot:

Hey @jerempy!

Sorry that your PR wasn’t merged.

Do take a look at any of the other open issues to see if you’d like to take something up! We’re around on Discord if you have any questions :smile:

hasura-bot avatar Nov 09 '22 16:11 hasura-bot