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

Cannot see Schema visualisation on the playground #90

Open
circap-ppb opened this issue Jul 23, 2020 · 0 comments
Open

Cannot see Schema visualisation on the playground #90

circap-ppb opened this issue Jul 23, 2020 · 0 comments

Comments

@circap-ppb
Copy link

circap-ppb commented Jul 23, 2020

After building a really basic graphql application with queries, I was trying to check the schema by using the Playground (/gui).
I could see that if the query return POJO created by me (for example User.java), the Playground doesn't allow me to check the schema.

@GraphQLApi
public class SpqrTest {

    @GraphQLQuery
    public User getObject() {
        User user = new User();
        user.setName("name");
        return user;
    }
}

public class User {
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    private String name;
}

by going into http://localhost:8080/gui
and them select schema
it appears an empty page and by inspecting it, I could see this:

react-dom.production.min.js:209 SyntaxError: Syntax Error: Unexpected Name "name" (5:3)
  3 | 
  4 | 
> 5 |   name: String
    |   ^
  6 | }
  7 | 
  8 | 
    at t.start.line (parser-graphql.js:1)
    at Object.parse (parser-graphql.js:1)
    at Object.parse (standalone.js:13721)
    at Hs (standalone.js:17145)
    at Ws (standalone.js:17381)
    at formatWithCursor (standalone.js:17397)
    at standalone.js:32917
    at Object.format (standalone.js:32926)
    at Object.t.prettify (utils.ts:22)
    at Object.l [as getSDL] (createSDL.ts:94)

If the queries created by me return String or Integer, I can see the schema on the Playground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant