-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wip typescript subscription with server #19
Wip typescript subscription with server #19
Conversation
const scalarValueNode = valueNode as ScalarValueNode; | ||
output = scalarValueNode.value; | ||
} else if (valueNode.kind === "ObjectValue") { | ||
const objectValueNode = valueNode as ObjectValueNode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
output = obj; | ||
} else if (valueNode.kind === "ListValue") { | ||
const listValueNode = valueNode as ListValueNode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const type = schema.getType(name); | ||
|
||
if (type instanceof GraphQLObjectType || type instanceof GraphQLInterfaceType) { | ||
const objectOrInterfaceType = type as GraphQLObjectType | GraphQLInterfaceType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export default function mergeObjects(obj: ObjectMap, src: ObjectMap, matcher: MergeObjectsMatcher): ObjectMap { | ||
function mergeCustomizer(objValue: any, srcValue: any, key: string): any[] | undefined { | ||
if (!isArray(objValue) || !isArray(srcValue)) return undefined; | ||
const objValues = objValue as any[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function mergeCustomizer(objValue: any, srcValue: any, key: string): any[] | undefined { | ||
if (!isArray(objValue) || !isArray(srcValue)) return undefined; | ||
const objValues = objValue as any[]; | ||
const srcValues = srcValue as any[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
if (!(type instanceof GraphQLObjectType) && !(type instanceof GraphQLInterfaceType)) return undefined; | ||
const objectOrInterfaceType = type as GraphQLObjectType | GraphQLInterfaceType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try { | ||
const context: RequestContext = { fieldTypeMap: new Map() }; | ||
const updated = await this._requestParser.updateRequest(query, opts, context); | ||
errors = validate(this._schema, updated.ast) as GraphQLError[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}; | ||
|
||
if (cachePromise) output.cachePromise = cachePromise; | ||
if (queryHash) output.queryHash = queryHash as string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report
@@ Coverage Diff @@
## master #19 +/- ##
===========================================
- Coverage 91.25% 79.24% -12.01%
===========================================
Files 5 39 +34
Lines 503 1349 +846
Branches 0 297 +297
===========================================
+ Hits 459 1069 +610
- Misses 44 207 +163
- Partials 0 73 +73
Continue to review full report at Codecov.
|
No description provided.