Skip to content

How to return non-scalar type ('Payload') in typescript/graphql example #291

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

Closed
vjsingh opened this issue Nov 27, 2018 · 1 comment
Closed

Comments

@vjsingh
Copy link

vjsingh commented Nov 27, 2018

In the typescript/graphql example, if you want to return a more complex type, such as:

In https://github.com/prisma/prisma-examples/blob/master/typescript/graphql/src/schema.graphql

publish(id: ID!): PublishPayload
type PublishPayload {
  post: Post!
  otherInformation: String!
}

You get an error when running graphqlgen "Some types from your application schema have model definitions that are not defined yet"

What is the recommended way to do this? Must be an easier way than maintaining a separate .ts types definition for all these types?

@vjsingh
Copy link
Author

vjsingh commented Nov 27, 2018

It appears this is a duplicate: prisma-labs/graphqlgen#181

@vjsingh vjsingh closed this as completed Nov 27, 2018
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