You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While GraphQL traditionally has a single entry point for all Queries and Mutations, REST usually organizes both across routes. For example, the following GraphQL Schema:
type Query {
user(id: string): User
userPermissions(userId: string): UserPermissions
}
type Mutation {
updateUserPermissions(userId: string, permissions: UserPermissions): UserPermissions
}
would traditionally be implemented in REST in the following routes:
`GET /users/:id``
GET /users/:id/permissions
POST /users/:id/permissions
but this sort of organization of REST routes seems to currently be impossible, leading to undesired rest routes such as :
`GET /users``
GET /userPermissions
POST /userPermissions
which seems fine at first, but not as the API surface area grows and organization of routing becomes very important.
The text was updated successfully, but these errors were encountered:
While GraphQL traditionally has a single entry point for all Queries and Mutations, REST usually organizes both across routes. For example, the following GraphQL Schema:
would traditionally be implemented in REST in the following routes:
GET /users/:id/permissions
POST /users/:id/permissions
but this sort of organization of REST routes seems to currently be impossible, leading to undesired rest routes such as :
GET /userPermissions
POST /userPermissions
which seems fine at first, but not as the API surface area grows and organization of routing becomes very important.
The text was updated successfully, but these errors were encountered: