I tried import like `# import User from "../prisma...
# orm-help
j
I tried import like
# import User from "../prisma/generated/prisma.graphql"
then using it as follow
Copy code
type Query {
  users: [User!]!
}

type Mutation {
  createUser(email: String!): User
}
d
Please use threads 🙏 Can you please share a small repository explaining the issue? Prisma generate works with the Prisma datamodel https://www.prisma.io/docs/prisma-cli-and-configuration/cli-command-reference/prisma-generate-xcv2/#prisma-generate But it looks like you are attempting to use that with schema directly somehow. I would love to understand your use case 🙂
j
@divyendu Thank you reply. But I think this is problem of library gqlgen of golang not by prisma. I also asked the authors but they said it does not support import.
But in our case. I am using golang so on the schema.graphql of server it should make use of some type that generated from prisma.
d
Yes,
# import
syntax in JS/TS world is powered by this project: https://github.com/prisma/graphql-import It is built in many tools, so, it give the feeling that it just works 🙂 But mainly, all this project does is concatenate the files together, base version of that should be easy to write in golang. You can share a repository with your requirements/challenges to bounce off ideas with the community 🙂
j
@divyendu Pls see this repo https://github.com/thanhngvpt/hello-prisma I've comment on file
server/schema.graphql
. Thank you
👍 1
@divyendu How about it?
d
It will take me a while to get to this, I will get back to you maybe by Monday 🙏 I will see if I can engage some community member though who is interested in Go stuff 🙂
j
Many thank.
d
So, I read through the example, and I think we need to reimplement the logic of
graphql-import
https://github.com/prisma/graphql-import in go lang. I am not aware of any project that implements this already.
👍 1
j
@divyendu It's a good news.