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

[Bug]: GraphQL error when authorizedPublicKeys is present #177

Closed
pvalette opened this issue Dec 21, 2021 · 2 comments · Fixed by #195
Closed

[Bug]: GraphQL error when authorizedPublicKeys is present #177

pvalette opened this issue Dec 21, 2021 · 2 comments · Fixed by #195
Assignees
Labels
API Involve API facing user bug Something isn't working

Comments

@pvalette
Copy link

What happened?

The following request provide an internal error
query
{
transaction(address:"005c61f515b671d7b2c4acc01ae98a970707b43c18aed3a56c4e5b70ff1dfbbf2c") {

data
{
  ownerships
  {
    secret
    authorizedPublicKeys
    {
      encryptedSecretKey
      publicKey
    }
  }
}

}
}

If you remove the section
authorizedPublicKeys
{
encryptedSecretKey
publicKey
}
}

it works fine

What is expected ?

To have the list of authorized Public Keys

@pvalette pvalette added the bug Something isn't working label Dec 21, 2021
@ghost ghost added the API Involve API facing user label Dec 21, 2021
@ghost
Copy link

ghost commented Dec 21, 2021

The issue seams related to a problem of formatting of input data.
From lib/archethic_web/graphql_schema/transaction_type.ex:94

@roychowdhuryrohit-dev
Copy link
Contributor

roychowdhuryrohit-dev commented Jan 13, 2022

Bug fixed. It was what I predicted.

Here authorized_keys field is not an array...it is a scalar map.

But in lib/archethic_web/graphql_schema/transaction_type.ex:93 field “authorized_public_keys” expects list_of(list_of(authorized _key)), resulting in mapping issue.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Involve API facing user bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants