schema.graphql 5.8 KB

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