Can a master help me answer the question? Thank yo...
# orm-help
h
Can a master help me answer the question? Thank you https://github.com/prisma/prisma-examples/issues/2417
n
Hey Hong, welcome to our Slack 😄 can you elaborate a bit on what exactly your problem is? As mentioned here, the README needs to be updated but in the comment on GitHub there's an explanation for how to work around the issue 🙂
h
Hello, I have implemented the solution according to the issues in this article. But there is an extended question in the latest message. Thank you for your reply here.
n
Good to know 🙂
But there is an extended question in the latest message.
Can you please point me to the message you're referring to? Happy to help 🙂
h
I added the following code according to your reply
Copy code
t.field('profile', {
      type: 'Profile',
      resolve: (parent) =>
        prisma.user
          .findUnique({
            where: { id: Number(parent.id) },
          })
          .profile(),
    })
The error message is as follows
I have already added Profile in schema.prisma
n
Ah I see, you also need to add
Profile
to the
types
array in
makeSchema
and also make sure to run the server so that Nexus generates the types 🙂 the instructions here are probably more up to date than the ones in the README you're currently following: https://github.com/prisma/prisma-examples/tree/latest/typescript/graphql#1-migrate-your-database-using-prisma-migrate
h
Thanks for your response i will try to see
@nikolasburk I use this example, but still encounter the same problem.
Add the 
Profile
 type to your GraphQL schema. May need to be modified to the following figure:
n
What exactly is the error message that you see? 🙂