graphql-codegen-typescript-react-apollo-named
Advanced tools
Comparing version 0.15.1-rc1 to 0.15.1-rc2
@@ -320,3 +320,3 @@ (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap | ||
module.exports = "{{#ifCond operations.length '!==' 0}}\r\nimport * as ReactApollo from 'react-apollo';\r\nimport * as React from 'react';\r\n\r\n{{#unless @root.config.noGraphqlTag}}\r\nimport gql from 'graphql-tag';\r\n{{/unless}}\r\n\r\n{{ blockCommentIf 'Fragments' fragments }}\r\n{{{generateFragments fragments}}}\r\n\r\n{{ blockCommentIf 'Components' operations }}\r\n{{#each operations }}\r\n {{#unless @root.config.noNamespaces}}\r\nexport namespace {{convert name}} {\r\n {{/unless}}\r\n export const {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}Document = {{{ gql this }}};\r\n export class {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}Component extends React.Component<Partial<ReactApollo.{{ convert operationType }}Props<{{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}{{convert operationType}}, {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}Variables>>> {\r\n render(){\r\n return (\r\n <ReactApollo.{{ convert operationType }}<{{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}{{convert operationType}}, {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}Variables>\r\n {{ toLowerCase operationType }}={ {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}Document }\r\n {...(this as any)['props'] as any}\r\n />\r\n );\r\n }\r\n }\r\n {{#unless @root.config.noHOC}}\r\n export type {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}Props<TChildProps = any> = {{{propsType this}}} & TChildProps;\r\n {{#ifCond operationType '===' 'mutation'}}\r\n export type {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}MutationFn = ReactApollo.MutationFn<{{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}{{convert operationType}}, {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}Variables>;\r\n {{/ifCond}}\r\n export function {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}HOC<TProps, TChildProps = any>(operationOptions: \r\n ReactApollo.OperationOption<\r\n TProps, \r\n {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}{{convert operationType}},\r\n {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}Variables,\r\n {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}Props<TChildProps>\r\n > | undefined){\r\n return ReactApollo.graphql<TProps, {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}{{convert operationType}}, {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}Variables, {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}Props<TChildProps>>(\r\n {{#if @root.config.noNamespaces}}{{ convert name }}{{/if}}Document,\r\n {\r\n name: {{ convert name }},\r\n ...operationOptions,\r\n }\r\n );\r\n };\r\n {{/unless}}\r\n {{#unless @root.config.noNamespaces}}\r\n}\r\n {{/unless}}\r\n{{/each}}\r\n{{/ifCond}}\r\n" | ||
module.exports = "{{#ifCond operations.length '!==' 0}}\r\n{{#unless @root.config.noReactApolloTag}}\r\nimport * as ReactApollo from 'react-apollo';\r\nimport * as React from 'react';\r\n{{/unless}}\r\n\r\n{{#unless @root.config.noGraphqlTag}}\r\nimport gql from 'graphql-tag';\r\n{{/unless}}\r\n\r\n{{#unless @root.config.noFragments}}\r\n{{ blockCommentIf 'Fragments' fragments }}\r\n{{{generateFragments fragments}}}\r\n{{/unless}}\r\n\r\n{{ blockCommentIf 'Components' operations }}\r\n{{#each operations }}\r\nexport namespace {{convert name}} {\r\n {{#unless @root.config.noDocuments}}\r\n export const Document = {{{ gql this }}};\r\n {{/unless}}\r\n {{#unless @root.config.noHOC}}\r\n export type {{ name }}Props<TChildProps = any> = {{{propsType this}}} & TChildProps;\r\n {{#ifCond operationType '===' 'mutation'}}\r\n export type MutationFn = ReactApollo.MutationFn<{{convert operationType}}, Variables>;\r\n {{/ifCond}}\r\n export function HOC<TProps, TChildProps = any>(operationOptions:\r\n ReactApollo.OperationOption<\r\n TProps, \r\n {{convert operationType}},\r\n Variables,\r\n Props<TChildProps>\r\n > | undefined){\r\n return ReactApollo.graphql<TProps, {{convert operationType}}, Variables, Props<TChildProps>>(\r\n Document,\r\n {\r\n name: {{ convert name }},\r\n ...operationOptions,\r\n }\r\n );\r\n };\r\n {{/unless}}\r\n}\r\n{{/each}}\r\n{{/ifCond}}\r\n" | ||
@@ -323,0 +323,0 @@ /***/ }) |
@@ -52,3 +52,3 @@ { | ||
"typings": "dist/index.d.ts", | ||
"version": "0.15.1-rc1" | ||
"version": "0.15.1-rc2" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
36703
320