Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Add support for querying relationship data #11

Closed
wtrocki opened this issue Jun 3, 2019 · 4 comments
Closed

Add support for querying relationship data #11

wtrocki opened this issue Jun 3, 2019 · 4 comments

Comments

@wtrocki
Copy link
Contributor

wtrocki commented Jun 3, 2019

Add support for querying relationships using resolvers.

@wtrocki wtrocki added the CRUD label Jun 3, 2019
@ankitjena ankitjena added this to In progress in GraphBack 1.0.0 Jun 4, 2019
@ankitjena ankitjena moved this from In progress to To do in GraphBack 1.0.0 Jun 4, 2019
@wtrocki wtrocki closed this as completed Aug 2, 2019
GraphBack 1.0.0 automation moved this from To do to Done Aug 2, 2019
@richcorbs
Copy link
Contributor

richcorbs commented Aug 9, 2019

If I have

type Comment {
  description: String!
  userId: ID!
}

Is there a way to get the user in a graphql comment query like this?

{
  findAllComments {
    description
    user {
      name
    }
}

Do I need to create a Comment: User resolver?

@richcorbs
Copy link
Contributor

When I tried...

type Comment {
  description: String!
  user: User!
}

...it added user.commentId which is the inverse of what I intended.

@wtrocki wtrocki reopened this Aug 9, 2019
GraphBack 1.0.0 automation moved this from Done to In progress Aug 9, 2019
@ankitjena
Copy link
Collaborator

ankitjena commented Aug 9, 2019

Is there a way to get the user in a graphql comment query like this?

{
  findAllComments {
    description
    user {
      name
    }
}

Do I need to create a Comment: User resolver?

We are missing this and only creating user: Comment resolver. Need to do the other way too. Thanks @richcorbs for pointing this out.

@ankitjena
Copy link
Collaborator

@richcorbs Issue #209 is tracking this. Closing this.

GraphBack 1.0.0 automation moved this from In progress to Done Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Development

No branches or pull requests

3 participants