schema.graphql237 lines · main
| 1 | schema { |
| 2 | query: RootQueryType |
| 3 | } |
| 4 | |
| 5 | """ |
| 6 | A document containing content from the Briven docs. This is a guide, which might describe a concept, or explain the steps for using or implementing a feature. |
| 7 | """ |
| 8 | type Guide implements SearchResult { |
| 9 | """The title of the document""" |
| 10 | title: String |
| 11 | |
| 12 | """The URL of the document""" |
| 13 | href: String |
| 14 | |
| 15 | """ |
| 16 | The full content of the document, including all subsections (both those matching and not matching any query string) and possibly more content |
| 17 | """ |
| 18 | content: String |
| 19 | |
| 20 | """ |
| 21 | The subsections of the document. If the document is returned from a search match, only matching content chunks are returned. For the full content of the original document, use the content field in the parent Guide. |
| 22 | """ |
| 23 | subsections: SubsectionCollection |
| 24 | } |
| 25 | |
| 26 | """Document that matches a search query""" |
| 27 | interface SearchResult { |
| 28 | """The title of the matching result""" |
| 29 | title: String |
| 30 | |
| 31 | """The URL of the matching result""" |
| 32 | href: String |
| 33 | |
| 34 | """The full content of the matching result""" |
| 35 | content: String |
| 36 | } |
| 37 | |
| 38 | """ |
| 39 | A collection of content chunks from a larger document in the Briven docs. |
| 40 | """ |
| 41 | type SubsectionCollection { |
| 42 | """A list of edges containing nodes in this collection""" |
| 43 | edges: [SubsectionEdge!]! |
| 44 | |
| 45 | """The nodes in this collection, directly accessible""" |
| 46 | nodes: [Subsection!]! |
| 47 | |
| 48 | """The total count of items available in this collection""" |
| 49 | totalCount: Int! |
| 50 | } |
| 51 | |
| 52 | """An edge in a collection of Subsections""" |
| 53 | type SubsectionEdge { |
| 54 | """The Subsection at the end of the edge""" |
| 55 | node: Subsection! |
| 56 | } |
| 57 | |
| 58 | """A content chunk taken from a larger document in the Briven docs""" |
| 59 | type Subsection { |
| 60 | """The title of the subsection""" |
| 61 | title: String |
| 62 | |
| 63 | """The URL of the subsection""" |
| 64 | href: String |
| 65 | |
| 66 | """The content of the subsection""" |
| 67 | content: String |
| 68 | } |
| 69 | |
| 70 | """ |
| 71 | A reference document containing a description of a Briven CLI command |
| 72 | """ |
| 73 | type CLICommandReference implements SearchResult { |
| 74 | """The title of the document""" |
| 75 | title: String |
| 76 | |
| 77 | """The URL of the document""" |
| 78 | href: String |
| 79 | |
| 80 | """The content of the reference document, as text""" |
| 81 | content: String |
| 82 | } |
| 83 | |
| 84 | """ |
| 85 | A reference document containing a description of a function from a Briven client library |
| 86 | """ |
| 87 | type ClientLibraryFunctionReference implements SearchResult { |
| 88 | """The title of the document""" |
| 89 | title: String |
| 90 | |
| 91 | """The URL of the document""" |
| 92 | href: String |
| 93 | |
| 94 | """The content of the reference document, as text""" |
| 95 | content: String |
| 96 | |
| 97 | """The programming language for which the function is written""" |
| 98 | language: Language! |
| 99 | |
| 100 | """The name of the function or method""" |
| 101 | methodName: String |
| 102 | } |
| 103 | |
| 104 | enum Language { |
| 105 | JAVASCRIPT |
| 106 | SWIFT |
| 107 | DART |
| 108 | CSHARP |
| 109 | KOTLIN |
| 110 | PYTHON |
| 111 | } |
| 112 | |
| 113 | """A document describing how to troubleshoot an issue when using Briven""" |
| 114 | type TroubleshootingGuide implements SearchResult { |
| 115 | """The title of the troubleshooting guide""" |
| 116 | title: String |
| 117 | |
| 118 | """The URL of the troubleshooting guide""" |
| 119 | href: String |
| 120 | |
| 121 | """The full content of the troubleshooting guide""" |
| 122 | content: String |
| 123 | } |
| 124 | |
| 125 | type RootQueryType { |
| 126 | """Get the GraphQL schema for this endpoint""" |
| 127 | schema: String! |
| 128 | |
| 129 | """Search the Briven docs for content matching a query string""" |
| 130 | searchDocs(query: String!, limit: Int): SearchResultCollection |
| 131 | |
| 132 | """Get the details of an error code returned from a Briven service""" |
| 133 | error(code: String!, service: Service!): Error |
| 134 | |
| 135 | """Get error codes that can potentially be returned by Briven services""" |
| 136 | errors( |
| 137 | """Returns the first n elements from the list""" |
| 138 | first: Int |
| 139 | |
| 140 | """Returns elements that come after the specified cursor""" |
| 141 | after: String |
| 142 | |
| 143 | """Returns the last n elements from the list""" |
| 144 | last: Int |
| 145 | |
| 146 | """Returns elements that come before the specified cursor""" |
| 147 | before: String |
| 148 | |
| 149 | """Filter errors by a specific Briven service""" |
| 150 | service: Service |
| 151 | |
| 152 | """Filter errors by a specific error code""" |
| 153 | code: String |
| 154 | ): ErrorCollection |
| 155 | } |
| 156 | |
| 157 | """A collection of search results containing content from Briven docs""" |
| 158 | type SearchResultCollection { |
| 159 | """A list of edges containing nodes in this collection""" |
| 160 | edges: [SearchResultEdge!]! |
| 161 | |
| 162 | """The nodes in this collection, directly accessible""" |
| 163 | nodes: [SearchResult!]! |
| 164 | |
| 165 | """The total count of items available in this collection""" |
| 166 | totalCount: Int! |
| 167 | } |
| 168 | |
| 169 | """An edge in a collection of SearchResults""" |
| 170 | type SearchResultEdge { |
| 171 | """The SearchResult at the end of the edge""" |
| 172 | node: SearchResult! |
| 173 | } |
| 174 | |
| 175 | """An error returned by a Briven service""" |
| 176 | type Error { |
| 177 | """ |
| 178 | The unique code identifying the error. The code is stable, and can be used for string matching during error handling. |
| 179 | """ |
| 180 | code: String! |
| 181 | |
| 182 | """The Briven service that returns this error.""" |
| 183 | service: Service! |
| 184 | |
| 185 | """The HTTP status code returned with this error.""" |
| 186 | httpStatusCode: Int |
| 187 | |
| 188 | """ |
| 189 | A human-readable message describing the error. The message is not stable, and should not be used for string matching during error handling. Use the code instead. |
| 190 | """ |
| 191 | message: String |
| 192 | } |
| 193 | |
| 194 | enum Service { |
| 195 | AUTH |
| 196 | REALTIME |
| 197 | STORAGE |
| 198 | } |
| 199 | |
| 200 | """A collection of Errors""" |
| 201 | type ErrorCollection { |
| 202 | """A list of edges containing nodes in this collection""" |
| 203 | edges: [ErrorEdge!]! |
| 204 | |
| 205 | """The nodes in this collection, directly accessible""" |
| 206 | nodes: [Error!]! |
| 207 | |
| 208 | """Pagination information""" |
| 209 | pageInfo: PageInfo! |
| 210 | |
| 211 | """The total count of items available in this collection""" |
| 212 | totalCount: Int! |
| 213 | } |
| 214 | |
| 215 | """An edge in a collection of Errors""" |
| 216 | type ErrorEdge { |
| 217 | """The Error at the end of the edge""" |
| 218 | node: Error! |
| 219 | |
| 220 | """A cursor for use in pagination""" |
| 221 | cursor: String! |
| 222 | } |
| 223 | |
| 224 | """Pagination information for a collection""" |
| 225 | type PageInfo { |
| 226 | """Whether there are more items after the current page""" |
| 227 | hasNextPage: Boolean! |
| 228 | |
| 229 | """Whether there are more items before the current page""" |
| 230 | hasPreviousPage: Boolean! |
| 231 | |
| 232 | """Cursor pointing to the start of the current page""" |
| 233 | startCursor: String |
| 234 | |
| 235 | """Cursor pointing to the end of the current page""" |
| 236 | endCursor: String |
| 237 | } |