Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
What does an exclamation mark mean in a GraphQL schema?
+4
−0
Types are often followed by exclamation marks in GraphQL schemas. What do they mean?
type User {
id: Int!
email: String!
name: String!
updatedAt: String!
createdAt: String!
}
1 answer
+4
−0
It's a type modifier that means that the field is non-nullable.
That is, when uploading these types you must provide values for these fields, and in turn the server promises to always populate the field in query responses (or return an error if it cannot be done).
0 comment threads