{"pageProps":{"title":"Declarative API","docs":{"handwritten":[{"src":"declarative-api.md","frontmatter":{},"sections":[{"stub":"declarative-api","title":"Declarative API","level":1,"content":"<p>This is the reference for the declarative API parts of the library. See also <a href=\"/explanation/injection\">Background: GraphQL Injections</a>.</p>"}],"toc":{"level":1,"name":"declarative-api","title":"Declarative API","headings":[]}}],"docs":{"i18n":{"name":"i18n","source":"src/i18n.js","description":{"description":"Returns a translation of the given translation key with additional optional arguments","tags":[{"title":"category","description":"declarative"},{"title":"param","description":"translation tag/key","type":{"type":"NameExpression","name":"string"},"name":"key"},{"title":"param","description":"optional translation parameters","type":{"type":"RestType","expression":{"type":"NameExpression","name":"string"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"string"}}]},"group":"FUNCTION","reactDocGen":null,"start":30,"end":55,"category":"declarative","link":"declarative-api#i18n"},"injection":{"name":"injection","source":"src/injection.js","description":{"description":"Declares a GraphQL injection that will be automatically provided to the process scope on process initialization.\n\nThe returned value is a query declaration object that is used to resolve the data from the initial process data\nprovided by the server.\n\nThe server in turn uses JSON data generated by NPM module \"babel-plugin-track-usage\" to automatically determine\nthe injection queries.\n\nThe GraphQL query value will be stripped of its first level. There can be only one query or mutation per injection.\nThis has no performance implications since all initial process queries are running at once on the server side anyway.","tags":[{"title":"category","description":"declarative"},{"title":"param","description":"query string","type":null,"name":"query"},{"title":"param","description":"Formal variable parameter. Not really used on the client side per se. Only needed to be detected\n                         by NPM module \"babel-plugin-track-usage\"","type":null,"name":"defaultVars"},{"title":"returns","description":"query declaration","type":{"type":"NameExpression","name":"GraphQLQuery"}}]},"group":"FUNCTION","reactDocGen":null,"start":24,"end":31,"category":"declarative","link":"declarative-api#injection"},"query":{"name":"query","source":"src/query.js","description":{"description":"Creates a GraphQL query with the given query string and default variables.\n\nThis static version can be tracked by babel-plugin-track-usage and is used to\ndeclare named queries.","tags":[{"title":"category","description":"declarative"},{"title":"param","description":"query String","type":{"type":"NameExpression","name":"String"},"name":"query"}]},"group":"FUNCTION","reactDocGen":null,"start":17,"end":24,"category":"declarative","link":"declarative-api#query"}},"functions":["i18n","injection","query"]}},"__N_SSG":true}