joystream icon indicating copy to clipboard operation
joystream copied to clipboard

Unable to view members: "Runtime Object type "MembershipEntryGifted" is not a possible type for "MembershipEntryMethod""

Open singulart opened this issue 2 years ago • 2 comments

Steps:

  1. Go to https://dao-git-carthage-joystream.vercel.app/#/members
  2. Observe empty list of members despite 24 is shown as the total count of members
  3. Observe the error in console:
Error: Runtime Object type "MembershipEntryGifted" is not a possible type for "MembershipEntryMethod".
    at new n (index.js:29:28)
    at Module.ni (useQuery.js:195:74)
    at n.useGetMembersWithDetailsQuery (members.generated.tsx:764:17)
    at n.useMembers (useMembers.ts:29:41)
    at n.Members (Members.tsx:27:58)
    at ro (react-dom.production.min.js:157:137)
    at Go (react-dom.production.min.js:180:154)
    at zd (react-dom.production.min.js:269:343)
    at Eu (react-dom.production.min.js:250:347)
    at _u (react-dom.production.min.js:250:278)
n.error @ error.ts:1

┆Issue is synchronized with this Asana task by Unito

singulart avatar Aug 15 '22 10:08 singulart

@singulart pls add the network config to the ticket.

dmtrjsg avatar Aug 15 '22 10:08 dmtrjsg

In the graphQl schemaMembershipEntryGifted is missing from the MembershipEntryMethod union type.

As a result:

query {
  memberships {  
    entry {
      ...on MembershipEntryGenesis { __typename }
      ...on MembershipEntryInvited { __typename }
      ...on MembershipEntryPaid {  __typename }
    }
  }
}

Results in:

{
  "errors": [
    {
      "message": "Runtime Object type \"MembershipEntryGifted\" is not a possible type for \"MembershipEntryMethod\".",
      "locations": [
        {
          "line": 3,
          "column": 5
        }
      ],
      "path": [
        "memberships",
        0,
        "entry"
      ],
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "exception": {
          "message": "Runtime Object type \"MembershipEntryGifted\" is not a possible type for \"MembershipEntryMethod\".",
          "locations": [
            {
              "line": 3,
              "column": 5
            }
          ]
        }
      }
    }
  ],
  "data": null
}

thesan avatar Aug 16 '22 16:08 thesan