prisma / prisma-admin-feedback

Feedback for Prisma Admin (currently in invite-only preview)
6 stars 1 forks source link

Almost nothing is shown in the example project #127

Open yoshiakis opened 5 years ago

yoshiakis commented 5 years ago

What is the expected behavior? Prisma Admin shows all of the data for each model.

What is the actual behavior? Prisma Admin shows almost nothing.

What steps may we take to reproduce the behavior? Open this post, which is about introducing Prisma Admin, and click on "Open the example project".

I got the following error on the browser console.

generatedDemoProject.js:1 Uncaught (in promise) Error: Cannot query field 'createUser' on type 'Mutation'. (line 2, column 3):
  ada: createUser(data: {
  ^: {"response":{"data":null,"errors":[{"message":"Cannot query field 'createUser' on type 'Mutation'. (line 2, column 3):\n  ada: createUser(data: {\n  ^","locations":[{"line":2,"column":3}]},{"message":"Cannot query field 'createUser' on type 'Mutation'. (line 28, column 3):\n  grace: createUser(data: {\n  ^","locations":[{"line":28,"column":3}]},{"message":"Cannot query field 'createUser' on type 'Mutation'. (line 60, column 3):\n  lynn: createUser(data: {\n  ^","locations":[{"line":60,"column":3}]}],"status":200},"request":{"query":"mutation {\n  ada: createUser(data: {\n    name: \"Ada\"\n    email: \"ada@prisma.io\"\n    role: ADMIN\n    posts: {\n      create: [\n        {\n          title: \"Introducing the Analytical Engine\"\n        }\n        {\n          title: \"Building General-Purpose Computers\"\n          published: true\n        }\n        {\n          title: \"RESTful APIs Considered Harmful\"\n        }\n        {\n          title: \"Why Algorithms are Awesome\"\n          published: true\n        }\n      ]\n    }\n  }) {\n    id\n  }\n\n  grace: createUser(data: {\n    name: \"Grace\"\n    email: \"grace@prisma.io\"\n    posts: {\n      create: [\n        {\n          title: \"Five Things You Didn't Know About Compilers\"\n        }\n        {\n          title: \"GraphQL - The Query Language of the Future\"\n          published: true\n        }\n        {\n          title: \"Progamming with English Words\"\n          published: true\n          comments: {\n            create: {\n              text: \"Great work!\"\n              writtenBy: {\n                connect: {\n                  email: \"ada@prisma.io\"\n                }\n              }\n            }\n          }\n        }\n      ]\n    }\n  }) {\n    id\n  }\n\n  lynn: createUser(data: {\n    name: \"Lynn\"\n    email: \"lynn@prisma.io\"\n    posts: {\n      create: [\n        {\n          title: \"Working at Xerox PARC\"\n        }\n        {\n          title: \"Introduction to VLSI Systems\"\n          published: true\n          comments: {\n            create: [\n              {\n                text: \"I love this.\"\n                writtenBy: {\n                  connect: {\n                    email: \"ada@prisma.io\"\n                  }\n                }\n              }\n              {\n                text: \"Very interesting!\"\n                writtenBy: {\n                  connect: {\n                    email: \"grace@prisma.io\"\n                  }\n                }\n              }\n            ]\n          }\n        }\n      ]\n    }\n  }) {\n    id\n  }\n}"}}: {"response":{"data":null,"errors":[{"message":"Cannot query field 'createUser' on type 'Mutation'. (line 2, column 3):\n  ada: createUser(data: {\n  ^: {\"response\":{\"data\":null,\"errors\":[{\"message\":\"Cannot query field 'createUser' on type 'Mutation'. (line 2, column 3):\\n  ada: createUser(data: {\\n  ^\",\"locations\":[{\"line\":2,\"column\":3}]},{\"message\":\"Cannot query field 'createUser' on type 'Mutation'. (line 28, column 3):\\n  grace: createUser(data: {\\n  ^\",\"locations\":[{\"line\":28,\"column\":3}]},{\"message\":\"Cannot query field 'createUser' on type 'Mutation'. (line 60, column 3):\\n  lynn: createUser(data: {\\n  ^\",\"locations\":[{\"line\":60,\"column\":3}]}],\"status\":200},\"request\":{\"query\":\"mutation {\\n  ada: createUser(data: {\\n    name: \\\"Ada\\\"\\n    email: \\\"ada@prisma.io\\\"\\n    role: ADMIN\\n    posts: {\\n      create: [\\n        {\\n          title: \\\"Introducing the Analytical Engine\\\"\\n        }\\n        {\\n          title: \\\"Building General-Purpose Computers\\\"\\n          published: true\\n        }\\n        {\\n          title: \\\"RESTful APIs Considered Harmful\\\"\\n        }\\n        {\\n          title: \\\"Why Algorithms are Awesome\\\"\\n          published: true\\n        }\\n      ]\\n    }\\n  }) {\\n    id\\n  }\\n\\n  grace: createUser(data: {\\n    name: \\\"Grace\\\"\\n    email: \\\"grace@prisma.io\\\"\\n    posts: {\\n      create: [\\n        {\\n          title: \\\"Five Things You Didn't Know About Compilers\\\"\\n        }\\n        {\\n          title: \\\"GraphQL - The Query Language of the Future\\\"\\n          published: true\\n        }\\n        {\\n          title: \\\"Progamming with English Words\\\"\\n          published: true\\n          comments: {\\n            create: {\\n              text: \\\"Great work!\\\"\\n              writtenBy: {\\n                connect: {\\n                  email: \\\"ada@prisma.io\\\"\\n                }\\n              }\\n            }\\n          }\\n        }\\n      ]\\n    }\\n  }) {\\n    id\\n  }\\n\\n  lynn: createUser(data: {\\n    name: \\\"Lynn\\\"\\n    email: \\\"lynn@prisma.io\\\"\\n    posts: {\\n      create: [\\n        {\\n          title: \\\"Working at Xerox PARC\\\"\\n        }\\n        {\\n          title: \\\"Introduction to VLSI Systems\\\"\\n          published: true\\n          comments: {\\n            create: [\\n              {\\n                text: \\\"I love this.\\\"\\n                writtenBy: {\\n                  connect: {\\n                    email: \\\"ada@prisma.io\\\"\\n                  }\\n                }\\n              }\\n              {\\n                text: \\\"Very interesting!\\\"\\n                writtenBy: {\\n                  connect: {\\n                    email: \\\"grace@prisma.io\\\"\\n                  }\\n                }\\n              }\\n            ]\\n          }\\n        }\\n      ]\\n    }\\n  }) {\\n    id\\n  }\\n}\"}}","locations":[{"line":3,"column":5}],"path":["generateDemoProject"]}],"status":200},"request":{"query":"\n  mutation {\n    generateDemoProject\n  }\n"}}
    at t.<anonymous> (generatedDemoProject.js:1)
    at u (generatedDemoProject.js:1)
    at Object.next (generatedDemoProject.js:1)
    at a (generatedDemoProject.js:1)