Skip to content

Commit

Permalink
Drop extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed May 14, 2024
1 parent 882a96f commit 82ea7d1
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions grafast/website/examples/users-and-friends/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -388,19 +388,32 @@ async function main() {
},
}),
);
const result2 = stringifyPayload(
await grafastExecute({
schema: schemaGF,
document,
variableValues,
contextValue: { ...baseContext },
resolvedPreset,
outputDataAsString: asString,
}),
asString,
);
const grafastRawResult = await grafastExecute({
schema: schemaGF,
document,
variableValues,
contextValue: { ...baseContext },
resolvedPreset: {
extends: [resolvedPreset],
grafast: {
explain: ["plan"],
},
},
outputDataAsString: asString,
});
//const extensions = grafastRawResult.extensions;
delete grafastRawResult.extensions;

const result2 = stringifyPayload(grafastRawResult, asString);
assert.equal(result2, result1);
console.log(result1);
// await writeFile(
// `${__dirname}/planforjem.mermaid`,
// planToMermaid(extensions.explain.operations[0].plan, {
// skipBuckets: false,
// concise: true,
// }),
// );
}
break;
}
Expand Down

0 comments on commit 82ea7d1

Please sign in to comment.