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

How to return user specific subfield on the list query? #655

Closed
sakhmedbayev opened this issue Jan 3, 2019 · 3 comments
Closed

How to return user specific subfield on the list query? #655

sakhmedbayev opened this issue Jan 3, 2019 · 3 comments
Assignees
Labels
graphql-transformer-v1 Issue related to GraphQL Transformer v1 pending-response Issue is pending response from the issue author question General question

Comments

@sakhmedbayev
Copy link

** Which Category is your question related to? **
API

** What AWS Services are you utilizing? **
AppSync, User Pools

** Provide additional details e.g. code snippets **

I have set the following GraphQL schema:

type BookEntity @model @searchable {
  id: ID!
  content: String!
  bookmarks: [BookEntityBookmark] @connection(name: "BookEntityBookmarks")
}

type BookEntityBookmark
  @model(queries: null)
  @auth(
    rules: [
      {
        allow: owner
        ownerField: "owner"
        mutations: [create, update, delete]
        queries: [get, list]
      }
    ]
  ) {
  id: ID!
  bookEntity: BookEntity! @connection(name: "BookEntityBookmarks")
  bookmark: Bookmark! @connection(name: "BookmarkBookEntityBookmarks")
  owner: String
}

type Bookmark @model @auth(rules: [{ allow: owner }]) {
  id: ID!
  bookEntitys: [BookEntityBookmark!]!
    @connection(name: "BookmarkBookEntityBookmarks")
  owner: String
}

Now, when I query BookEntity as query listBookEntitys, I want listBookEntitys.bookmarks to return only currently logged in user's bookmarks. At the moment, however, I see bookmarks of all users.

What am I doing wrong?

@kaustavghosh06 kaustavghosh06 added graphql-transformer-v1 Issue related to GraphQL Transformer v1 question General question labels Jan 3, 2019
@kaustavghosh06 kaustavghosh06 added feature-request Request a new feature and removed question General question labels Mar 22, 2019
@kaustavghosh06 kaustavghosh06 added pending-triage Issue is pending triage and removed feature-request Request a new feature labels Aug 14, 2019
@nikhname nikhname added question General question and removed pending-triage Issue is pending triage labels Oct 10, 2019
@nikhname nikhname added pending-response Issue is pending response from the issue author and removed pending-response Issue is pending response from the issue author labels Oct 31, 2019
@nikhname
Copy link
Contributor

nikhname commented Oct 31, 2019

@sakhmedbayev could you update to the latest version of the CLI (3.17.0) and see if you are still unable to see only the logged in users?

@nikhname nikhname added the pending-response Issue is pending response from the issue author label Oct 31, 2019
@sakhmedbayev
Copy link
Author

Thanks! No longer relevant.

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
graphql-transformer-v1 Issue related to GraphQL Transformer v1 pending-response Issue is pending response from the issue author question General question
Projects
None yet
Development

No branches or pull requests

5 participants