@@ -665,7 +665,7 @@ function () {
665665 } else if ( error . networkError ) {
666666 console . error ( "Error sending the " . concat ( this . type , " '" ) . concat ( this . key , "'" ) , error . networkError ) ;
667667 } else {
668- console . error ( "[vue-apollo] An error has occured for " . concat ( this . type , " '" ) . concat ( this . key , "'" ) ) ;
668+ console . error ( "[vue-apollo] An error has occurred for " . concat ( this . type , " '" ) . concat ( this . key , "'" ) ) ;
669669
670670 if ( Array . isArray ( error ) ) {
671671 var _console ;
@@ -1513,7 +1513,7 @@ function formatObjectValue(value, previouslySeenValues) {
15131513 if ( value ) {
15141514 var customInspectFn = getCustomFn ( value ) ;
15151515
1516- if ( customInspectFn ) {
1516+ if ( customInspectFn !== undefined ) {
15171517 // $FlowFixMe(>=0.90.0)
15181518 var customValue = customInspectFn . call ( value ) ; // check for infinite recursion
15191519
@@ -1633,8 +1633,10 @@ classObject) {
16331633 *
16341634 */
16351635function invariant ( condition , message ) {
1636+ var booleanCondition = Boolean ( condition ) ;
16361637 /* istanbul ignore else */
1637- if ( ! condition ) {
1638+
1639+ if ( ! booleanCondition ) {
16381640 throw new Error ( message ) ;
16391641 }
16401642}
@@ -1872,14 +1874,14 @@ function lpad(len, str) {
18721874 return whitespace ( len - str . length ) + str ;
18731875}
18741876
1877+ function _typeof$2 ( obj ) { if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { _typeof$2 = function _typeof ( obj ) { return typeof obj ; } ; } else { _typeof$2 = function _typeof ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return _typeof$2 ( obj ) ; }
18751878/**
1876- * Copyright (c) Facebook, Inc. and its affiliates.
1877- *
1878- * This source code is licensed under the MIT license found in the
1879- * LICENSE file in the root directory of this source tree.
1880- *
1881- *
1879+ * A GraphQLError describes an Error found during the parse, validate, or
1880+ * execute phases of performing a GraphQL operation. In addition to a message
1881+ * and stack trace, it also includes information about the locations in a
1882+ * GraphQL document and/or execution result that correspond to the Error.
18821883 */
1884+
18831885function GraphQLError ( // eslint-disable-line no-redeclare
18841886message , nodes , source , positions , path , originalError , extensions ) {
18851887 // Compute list of blame nodes.
@@ -1925,7 +1927,15 @@ message, nodes, source, positions, path, originalError, extensions) {
19251927 } , [ ] ) ;
19261928 }
19271929
1928- var _extensions = extensions || originalError && originalError . extensions ;
1930+ var _extensions = extensions ;
1931+
1932+ if ( _extensions == null && originalError != null ) {
1933+ var originalExtensions = originalError . extensions ;
1934+
1935+ if ( originalExtensions != null && _typeof$2 ( originalExtensions ) === 'object' ) {
1936+ _extensions = originalExtensions ;
1937+ }
1938+ }
19291939
19301940 Object . defineProperties ( this , {
19311941 message : {
@@ -2070,24 +2080,11 @@ function dedentBlockStringValue(rawString) {
20702080 // Expand a block string's raw value into independent lines.
20712081 var lines = rawString . split ( / \r \n | [ \n \r ] / g) ; // Remove common indentation from all lines but first.
20722082
2073- var commonIndent = null ;
2074-
2075- for ( var i = 1 ; i < lines . length ; i ++ ) {
2076- var line = lines [ i ] ;
2077- var indent = leadingWhitespace ( line ) ;
2078-
2079- if ( indent < line . length && ( commonIndent === null || indent < commonIndent ) ) {
2080- commonIndent = indent ;
2081-
2082- if ( commonIndent === 0 ) {
2083- break ;
2084- }
2085- }
2086- }
2083+ var commonIndent = getBlockStringIndentation ( lines ) ;
20872084
2088- if ( commonIndent ) {
2089- for ( var _i = 1 ; _i < lines . length ; _i ++ ) {
2090- lines [ _i ] = lines [ _i ] . slice ( commonIndent ) ;
2085+ if ( commonIndent !== 0 ) {
2086+ for ( var i = 1 ; i < lines . length ; i ++ ) {
2087+ lines [ i ] = lines [ i ] . slice ( commonIndent ) ;
20912088 }
20922089 } // Remove leading and trailing blank lines.
20932090
@@ -2102,6 +2099,29 @@ function dedentBlockStringValue(rawString) {
21022099
21032100
21042101 return lines . join ( '\n' ) ;
2102+ } // @internal
2103+
2104+ function getBlockStringIndentation ( lines ) {
2105+ var commonIndent = null ;
2106+
2107+ for ( var i = 1 ; i < lines . length ; i ++ ) {
2108+ var line = lines [ i ] ;
2109+ var indent = leadingWhitespace ( line ) ;
2110+
2111+ if ( indent === line . length ) {
2112+ continue ; // skip empty lines
2113+ }
2114+
2115+ if ( commonIndent === null || indent < commonIndent ) {
2116+ commonIndent = indent ;
2117+
2118+ if ( commonIndent === 0 ) {
2119+ break ;
2120+ }
2121+ }
2122+ }
2123+
2124+ return commonIndent === null ? 0 : commonIndent ;
21052125}
21062126
21072127function leadingWhitespace ( str ) {
@@ -2201,13 +2221,10 @@ var TokenKind = Object.freeze({
22012221 BLOCK_STRING : 'BlockString' ,
22022222 COMMENT : 'Comment'
22032223} ) ;
2204- /**
2205- * The enum type representing the token kinds values.
2206- */
2207-
22082224/**
22092225 * A helper function to describe a token as a string for debugging
22102226 */
2227+
22112228function getTokenDesc ( token ) {
22122229 var value = token . value ;
22132230 return value ? "" . concat ( token . kind , " \"" ) . concat ( value , "\"" ) : token . kind ;
@@ -2631,16 +2648,18 @@ function readString(source, start, line, col, prev) {
26312648 break ;
26322649
26332650 case 117 :
2634- // u
2635- var charCode = uniCharCode ( body . charCodeAt ( position + 1 ) , body . charCodeAt ( position + 2 ) , body . charCodeAt ( position + 3 ) , body . charCodeAt ( position + 4 ) ) ;
2651+ {
2652+ // uXXXX
2653+ var charCode = uniCharCode ( body . charCodeAt ( position + 1 ) , body . charCodeAt ( position + 2 ) , body . charCodeAt ( position + 3 ) , body . charCodeAt ( position + 4 ) ) ;
26362654
2637- if ( charCode < 0 ) {
2638- throw syntaxError ( source , position , 'Invalid character escape sequence: ' + "\\u" . concat ( body . slice ( position + 1 , position + 5 ) , "." ) ) ;
2639- }
2655+ if ( charCode < 0 ) {
2656+ throw syntaxError ( source , position , 'Invalid character escape sequence: ' + "\\u" . concat ( body . slice ( position + 1 , position + 5 ) , "." ) ) ;
2657+ }
26402658
2641- value += String . fromCharCode ( charCode ) ;
2642- position += 4 ;
2643- break ;
2659+ value += String . fromCharCode ( charCode ) ;
2660+ position += 4 ;
2661+ break ;
2662+ }
26442663
26452664 default :
26462665 throw syntaxError ( source , position , "Invalid character escape sequence: \\" . concat ( String . fromCharCode ( code ) , "." ) ) ;
@@ -4219,7 +4238,7 @@ function parseDirectiveLocation(lexer) {
42194238 var start = lexer . token ;
42204239 var name = parseName ( lexer ) ;
42214240
4222- if ( DirectiveLocation . hasOwnProperty ( name . value ) ) {
4241+ if ( DirectiveLocation [ name . value ] !== undefined ) {
42234242 return name ;
42244243 }
42254244
@@ -4704,7 +4723,7 @@ var CApolloQuery = {
47044723 _result = Object . assign ( { } , _result ) ;
47054724
47064725 if ( errors && errors . length ) {
4707- error = new Error ( "Apollo errors occured (" . concat ( errors . length , ")" ) ) ;
4726+ error = new Error ( "Apollo errors occurred (" . concat ( errors . length , ")" ) ) ;
47084727 error . graphQLErrors = errors ;
47094728 }
47104729
@@ -5132,7 +5151,7 @@ function install(Vue, options) {
51325151}
51335152ApolloProvider . install = install ; // eslint-disable-next-line no-undef
51345153
5135- ApolloProvider . version = "3.0.0-beta.30 " ; // Apollo provider
5154+ ApolloProvider . version = "3.0.0-rc.1 " ; // Apollo provider
51365155
51375156var ApolloProvider$1 = ApolloProvider ; // Components
51385157
0 commit comments