MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / wrapGraphQlParams

Function wrapGraphQlParams

scripts/fb_GLOBAL.js:583–595  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

581// ================================== Helpers ==================================
582// =============================================================================
583export function wrapGraphQlParams(params) {
584 const formBody = [];
585 for (const property in params) {
586 const encodedKey = encodeURIComponent(property);
587 const value =
588 typeof params[property] === "string"
589 ? params[property]
590 : JSON.stringify(params[property]);
591 const encodedValue = encodeURIComponent(value);
592 formBody.push(encodedKey + "=" + encodedValue);
593 }
594 return formBody.join("&");
595}
596
597export async function fetchGraphQl(params, fb_dtsg) {
598 let form;

Callers 1

fetchGraphQlFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected