Skip to content

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

@vjsingh

Description

@vjsingh

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions