Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for schema description strings
- Loading branch information
Showing
6 changed files
with
199 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
""" | ||
Things that have a name. | ||
""" | ||
interface Named { | ||
"The unique name for the Named thing." | ||
name: String | ||
} | ||
|
||
""" | ||
File node type. | ||
""" | ||
enum FileNodeType { | ||
"A standard file-system file." | ||
FILE | ||
|
||
"A directory that may contain other files and directories." | ||
DIR | ||
|
||
"A special file, such as a device." | ||
SPECIAL | ||
} | ||
|
||
type DirectoryListing implements Named { | ||
name: String | ||
node_type: FileNodeType | ||
} | ||
|
||
""" | ||
String that identifies permissions on a file or directory. | ||
""" | ||
scalar Permissions | ||
|
||
""" | ||
Directory type. | ||
""" | ||
type Directory implements Named { | ||
name : String | ||
permissions: Permissions | ||
contents( | ||
""" | ||
Wildcard used for matching. | ||
""" | ||
match : String) : [DirectoryListing] | ||
} | ||
|
||
type File implements Named { | ||
name : String | ||
} | ||
|
||
"Stuff that can appear on the file system" | ||
union FileSystemEntry = File | Directory | ||
|
||
type Query { | ||
file(path : String) : FileSystemEntry | ||
} | ||
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.