Skip to content
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

Merged
merged 149 commits into from
Mar 18, 2018

Conversation

dylanaubrey
Copy link
Collaborator

No description provided.

const scalarValueNode = valueNode as ScalarValueNode;
output = scalarValueNode.value;
} else if (valueNode.kind === "ObjectValue") {
const objectValueNode = valueNode as ObjectValueNode;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Remove this unnecessary cast. rule


output = obj;
} else if (valueNode.kind === "ListValue") {
const listValueNode = valueNode as ListValueNode;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Remove this unnecessary cast. rule

const type = schema.getType(name);

if (type instanceof GraphQLObjectType || type instanceof GraphQLInterfaceType) {
const objectOrInterfaceType = type as GraphQLObjectType | GraphQLInterfaceType;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Remove this unnecessary cast. rule

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[];
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Remove this unnecessary cast. rule

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[];
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Remove this unnecessary cast. rule

}

if (!(type instanceof GraphQLObjectType) && !(type instanceof GraphQLInterfaceType)) return undefined;
const objectOrInterfaceType = type as GraphQLObjectType | GraphQLInterfaceType;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Remove this unnecessary cast. rule

try {
const context: RequestContext = { fieldTypeMap: new Map() };
const updated = await this._requestParser.updateRequest(query, opts, context);
errors = validate(this._schema, updated.ast) as GraphQLError[];
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Remove this unnecessary cast. rule

};

if (cachePromise) output.cachePromise = cachePromise;
if (queryHash) output.queryHash = queryHash as string;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Remove this unnecessary cast. rule

@dylanaubrey
Copy link
Collaborator Author

SonarQube analysis reported 8 issues

  • MINOR 8 minor

Watch the comments in this conversation to review them.

@codecov
Copy link

codecov bot commented Mar 18, 2018

Codecov Report

Merging #19 into master will decrease coverage by 12%.
The diff coverage is 79.24%.

Impacted file tree graph

@@             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
Impacted Files Coverage Δ
src/helpers/parsing/fragment-spreads/index.ts 100% <100%> (ø)
src/worker.ts 100% <100%> (ø)
src/helpers/sockets-supported/index.ts 100% <100%> (ø)
src/helpers/parsing/variable-definitions/index.ts 100% <100%> (ø)
src/helpers/hash-request/index.ts 100% <100%> (ø)
src/helpers/parsing/kind/index.ts 100% <100%> (ø)
src/helpers/parsing/index.ts 100% <100%> (ø)
src/helpers/parsing/alias/index.ts 100% <100%> (ø)
src/helpers/rehydrate-cache-metadata/index.ts 100% <100%> (ø)
src/helpers/parsing/type/index.ts 100% <100%> (ø)
... and 68 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5b2c1c...bbb5b02. Read the comment docs.

@dylanaubrey dylanaubrey merged commit c3ce093 into master Mar 18, 2018
@dylanaubrey dylanaubrey deleted the wip-typescript-subscription-with-server branch March 20, 2018 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant