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

Documents an example of array-based session variables

Open marcopeg opened this issue 5 months ago • 1 comments

Description

This PR aims to improve the documentation:

It provides an example of array-based session variables and how to use them in a permission rule.

Changelog

Component : server / cli / console / build

Type: bugfix / feature / enhancement

Product: community-edition

Short Changelog

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

marcopeg avatar Feb 07 '24 11:02 marcopeg

:robot:

Thanks for your PR @marcopeg!

A member of our team will review it and provide feedback shortly. We appreciate your patience and enthusiasm in improving Hasura.

Thank you for your contribution :rocket:

hasura-bot avatar Feb 07 '24 11:02 hasura-bot

Hey @marcopeg

Isn't this array notation meant to be square brackets?

X-Hasura-Allowed-Ids: {1,2,3}

seanparkross avatar Feb 20 '24 13:02 seanparkross

I’ll double check, but this is the notation that works for me. My guess is that Hasura follows Postgres’ array notation.

On Tue, 20 Feb 2024 at 14.08, Sean Park-Ross @.***> wrote:

Hey @marcopeg https://github.com/marcopeg

Isn't this array notation meant to be square brackets?

X-Hasura-Allowed-Ids: {1,2,3}

— Reply to this email directly, view it on GitHub https://github.com/hasura/graphql-engine/pull/10125#issuecomment-1954180673, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIMMMIAZAE6XTYVOZ4SUTYUSN3XAVCNFSM6AAAAABC5UUISWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJUGE4DANRXGM . You are receiving this because you were mentioned.Message ID: @.***>

marcopeg avatar Feb 20 '24 19:02 marcopeg

Yeah I think you're right. Curlys it is. I will merge this PR 🙏

seanparkross avatar Feb 20 '24 20:02 seanparkross

:robot:

GIF

Awesome work, @marcopeg!

Your changes were merged successfully. All of us at Hasura :heart: what you did.

Thanks again :rocket:

hasura-bot avatar Feb 20 '24 20:02 hasura-bot

🤠 On Tue, Feb 20, 2024 at 9:26 PM hasura-bot @.***> wrote:

🤖

[image: GIF] https://camo.githubusercontent.com/e0e31f58d52d663f1be6fdbdfc367f337f64e736fc1c10cb09117b3ed988e002/68747470733a2f2f6d65646961312e74656e6f722e636f6d2f696d616765732f31356165343132613239346266313238663662613765363061613065613865312f74656e6f722e676966

Awesome work, @marcopeg https://github.com/marcopeg!

Your changes were merged successfully https://github.com/hasura/graphql-engine/commits/master. All of us at Hasura ❤️ what you did.

Thanks again 🚀

— Reply to this email directly, view it on GitHub https://github.com/hasura/graphql-engine/pull/10125#issuecomment-1955013313, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIMMJE2IRZSRPZHBSQSN3YUUBGVAVCNFSM6AAAAABC5UUISWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJVGAYTGMZRGM . You are receiving this because you were mentioned.Message ID: @.***>

--

Best regards, Marco Pegoraro

m. @.*** C. +46 73 545 1223


This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.

marcopeg avatar Feb 21 '24 08:02 marcopeg