@@ -665,7 +665,7 @@ function () {
665
665
} else if ( error . networkError ) {
666
666
console . error ( "Error sending the " . concat ( this . type , " '" ) . concat ( this . key , "'" ) , error . networkError ) ;
667
667
} 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 , "'" ) ) ;
669
669
670
670
if ( Array . isArray ( error ) ) {
671
671
var _console ;
@@ -1513,7 +1513,7 @@ function formatObjectValue(value, previouslySeenValues) {
1513
1513
if ( value ) {
1514
1514
var customInspectFn = getCustomFn ( value ) ;
1515
1515
1516
- if ( customInspectFn ) {
1516
+ if ( customInspectFn !== undefined ) {
1517
1517
// $FlowFixMe(>=0.90.0)
1518
1518
var customValue = customInspectFn . call ( value ) ; // check for infinite recursion
1519
1519
@@ -1633,8 +1633,10 @@ classObject) {
1633
1633
*
1634
1634
*/
1635
1635
function invariant ( condition , message ) {
1636
+ var booleanCondition = Boolean ( condition ) ;
1636
1637
/* istanbul ignore else */
1637
- if ( ! condition ) {
1638
+
1639
+ if ( ! booleanCondition ) {
1638
1640
throw new Error ( message ) ;
1639
1641
}
1640
1642
}
@@ -1872,14 +1874,14 @@ function lpad(len, str) {
1872
1874
return whitespace ( len - str . length ) + str ;
1873
1875
}
1874
1876
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 ) ; }
1875
1878
/**
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.
1882
1883
*/
1884
+
1883
1885
function GraphQLError ( // eslint-disable-line no-redeclare
1884
1886
message , nodes , source , positions , path , originalError , extensions ) {
1885
1887
// Compute list of blame nodes.
@@ -1925,7 +1927,15 @@ message, nodes, source, positions, path, originalError, extensions) {
1925
1927
} , [ ] ) ;
1926
1928
}
1927
1929
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
+ }
1929
1939
1930
1940
Object . defineProperties ( this , {
1931
1941
message : {
@@ -2070,24 +2080,11 @@ function dedentBlockStringValue(rawString) {
2070
2080
// Expand a block string's raw value into independent lines.
2071
2081
var lines = rawString . split ( / \r \n | [ \n \r ] / g) ; // Remove common indentation from all lines but first.
2072
2082
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 ) ;
2087
2084
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 ) ;
2091
2088
}
2092
2089
} // Remove leading and trailing blank lines.
2093
2090
@@ -2102,6 +2099,29 @@ function dedentBlockStringValue(rawString) {
2102
2099
2103
2100
2104
2101
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 ;
2105
2125
}
2106
2126
2107
2127
function leadingWhitespace ( str ) {
@@ -2201,13 +2221,10 @@ var TokenKind = Object.freeze({
2201
2221
BLOCK_STRING : 'BlockString' ,
2202
2222
COMMENT : 'Comment'
2203
2223
} ) ;
2204
- /**
2205
- * The enum type representing the token kinds values.
2206
- */
2207
-
2208
2224
/**
2209
2225
* A helper function to describe a token as a string for debugging
2210
2226
*/
2227
+
2211
2228
function getTokenDesc ( token ) {
2212
2229
var value = token . value ;
2213
2230
return value ? "" . concat ( token . kind , " \"" ) . concat ( value , "\"" ) : token . kind ;
@@ -2631,16 +2648,18 @@ function readString(source, start, line, col, prev) {
2631
2648
break ;
2632
2649
2633
2650
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 ) ) ;
2636
2654
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
+ }
2640
2658
2641
- value += String . fromCharCode ( charCode ) ;
2642
- position += 4 ;
2643
- break ;
2659
+ value += String . fromCharCode ( charCode ) ;
2660
+ position += 4 ;
2661
+ break ;
2662
+ }
2644
2663
2645
2664
default :
2646
2665
throw syntaxError ( source , position , "Invalid character escape sequence: \\" . concat ( String . fromCharCode ( code ) , "." ) ) ;
@@ -4219,7 +4238,7 @@ function parseDirectiveLocation(lexer) {
4219
4238
var start = lexer . token ;
4220
4239
var name = parseName ( lexer ) ;
4221
4240
4222
- if ( DirectiveLocation . hasOwnProperty ( name . value ) ) {
4241
+ if ( DirectiveLocation [ name . value ] !== undefined ) {
4223
4242
return name ;
4224
4243
}
4225
4244
@@ -4704,7 +4723,7 @@ var CApolloQuery = {
4704
4723
_result = Object . assign ( { } , _result ) ;
4705
4724
4706
4725
if ( errors && errors . length ) {
4707
- error = new Error ( "Apollo errors occured (" . concat ( errors . length , ")" ) ) ;
4726
+ error = new Error ( "Apollo errors occurred (" . concat ( errors . length , ")" ) ) ;
4708
4727
error . graphQLErrors = errors ;
4709
4728
}
4710
4729
@@ -5132,7 +5151,7 @@ function install(Vue, options) {
5132
5151
}
5133
5152
ApolloProvider . install = install ; // eslint-disable-next-line no-undef
5134
5153
5135
- ApolloProvider . version = "3.0.0-beta.30 " ; // Apollo provider
5154
+ ApolloProvider . version = "3.0.0-rc.1 " ; // Apollo provider
5136
5155
5137
5156
var ApolloProvider$1 = ApolloProvider ; // Components
5138
5157
0 commit comments