For example, type is defined as follows:
type Task {
id: ID!
title: String!
completed: Boolean!
}
Request through postman as follows:
Now, Task operations can be performed through GraphQL:
At this point, I want to define a user type as follows:
type User {
username: String! @id
name: String
}
If I make the following request through postman:
When the execution is successful, I found that the Task-related GraphQL does not support.
If I send the type definition of Task and User together to initiate a request:
After successful execution, both Task and User-related GraphQL can be executed normally.
I want to know, do all the type definitions have to be executed together?
All my current types are dynamically defined, and it is difficult to put all type definitions together. Is there a better solution?