Skip to content

Instantly share code, notes, and snippets.

@benjie
Last active February 9, 2024 16:56
Show Gist options
  • Save benjie/19d784721d1658b89fd8954e7ee07034 to your computer and use it in GitHub Desktop.
Save benjie/19d784721d1658b89fd8954e7ee07034 to your computer and use it in GitHub Desktop.
Ideas for what the SemanticNonNull syntax could look like
type User {
id: ID!
username: String*
avatarUrl: String
bio: String
friends: [User*]*
}
type User {
id: ID!
username: ~String
avatarUrl: String
bio: String
friends: ~[~User]
}
type User {
id: ID!
username: ~String!
avatarUrl: String
bio: String
friends: ~[~User!]!
}
type User {
id: ID!
username: String~
avatarUrl: String
bio: String
friends: [User~]~
}
type User {
id: ID!
username: String!?
avatarUrl: String
bio: String
friends: [User!?]!?
}
type User {
id: ID!
username: String?
avatarUrl: String
bio: String
friends: [User?]?
}
type User {
id: ID!
username: String^
avatarUrl: String
bio: String
friends: [User^]^
}
type User {
id: ID!
username: (String)
avatarUrl: String
bio: String
friends: ([(User)])
}
type User {
id: ID!
username: (String!)
avatarUrl: String
bio: String
friends: ([(User!)]!)
}
type User {
id: ID!
username: <String>
avatarUrl: String
bio: String
friends: <[<User>]>
}
type User {
id: ID!
username: ?String!
avatarUrl: String
bio: String
friends: ?[?User!]!
}
type User {
id: ID!
username: !String
avatarUrl: String
bio: String
friends: ![!User]
}
type User {
id: ID!
username: String~!
avatarUrl: String
bio: String
friends: [User~!]~!
}
type User {
id: ID!
username: String~
avatarUrl: String
bio: String
friends: [User~]~
}
type User {
id: ID!
username: String!*
avatarUrl: String
bio: String
friends: [User!*]!*
}
type User {
id: ID!
username: String!^
avatarUrl: String
bio: String
friends: [User!^]!^
}
type User {
id: ID!
username: String-!
avatarUrl: String
bio: String
friends: [User-!]-!
}
type User {
id: ID!
username: String!!
avatarUrl: String
bio: String
friends: [User!!]!!
}
type User {
id: ID!
username: String+
avatarUrl: String
bio: String
friends: [User+]+
}
type User {
id: ID!
username: String+!
avatarUrl: String
bio: String
friends: [User+!]+!
}
type User {
id: ID!
username: String§
avatarUrl: String
bio: String
friends: [User§]§
}
type User {
id: ID!
username: |String|
avatarUrl: String
bio: String
friends: |[|User|]|
}
@benjie
Copy link
Author

benjie commented Feb 9, 2024

  friends: [User~!]~!
  friends: [User~!]!
  friends: [User!]~!

  friends: [User!^]!^
  friends: [User!^]!
  friends: [User!]!^
  
  friends: [User!*]!*
  friends: [User!*]!
  friends: [User!]!*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment