# Neo4j GraphQL Library how to use @auth with allow across relationship properties

**URL:** <https://community.neo4j.com/t/neo4j-graphql-library-how-to-use-auth-with-allow-across-relationship-properties/58641>\
**Category:** Neo4j Graph Platform\
**Tags:** migrated\
**Created:** [October 4, 2022, 12:39am UTC](https://community.neo4j.com/t/neo4j-graphql-library-how-to-use-auth-with-allow-across-relationship-properties/58641 "2022-10-04T00:39:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DevDan](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@DevDan](https://community.neo4j.com/u/DevDan)\
**Post date:** [October 4, 2022, 12:39am UTC](https://community.neo4j.com/t/neo4j-graphql-library-how-to-use-auth-with-allow-across-relationship-properties/58641/1 "2022-10-04T00:39:43Z")

</div>

I see in the documentation ([https://neo4j.com/docs/graphql-manual/current/auth/authorization/allow/](https://neo4j.com/docs/graphql-manual/current/auth/authorization/allow/)), you can use auth with allow across relationship.

However, I want to add read and edit properties on the relationship.

For example:

type User {

id: ID! @id(autogenerate: true)

authId: String! @unique

objects: [Object!]!

```
@relationship(type: "ACCESS", direction: OUT, properties: "Access")

```

}

type Object {

id: ID! @id(autogenerate: true)

users: [User!]!

```
@relationship(type: "ACCESS", direction: IN, properties: "Access")

```

}

interface Access @relationshipProperties {

edit: Boolean!

}

How do I setup my auth rules on object so that read operations is allowed for [:ACCESS] and edit operations is allowed for [:ACCESS {edit: true}].

Given the current documentation, it seems I need to create two relationships [:EDIT] and [:READ] for things to work, but that will complicate all my queries when dealing with user's objects.

---

<div class="post-metadata">

**Author:** ![Thomas\_Puech](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@Thomas\_Puech](https://community.neo4j.com/u/Thomas_Puech)\
**Post date:** [December 3, 2022, 5:29pm UTC](https://community.neo4j.com/t/neo4j-graphql-library-how-to-use-auth-with-allow-across-relationship-properties/58641/2 "2022-12-03T17:29:51Z")

</div>

Hey, I had a similar situation here: [https://www.reddit.com/r/Neo4j/](https://www.reddit.com/r/Neo4j/)

What people responded on the discord:

- The where clause transcribes to a cypher "all" clause so if only some of the where conditions are matched in the different relationships, then it will not work.

- To access a relationship property there seems to be no way of doing this right now inside @auth so the best solution for this is to make a custom resolver and pass some custom cypher that checks for the relationship property in there.

Late but hope that helps 🙂
