Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('Persisted Queries', () => {
const query = '{testString}';
const query2 = '{ testString }';
const hash = sha256
.create()
.update(query)
.hex();
const extensions = {
persistedQuery: {
version: VERSION,
sha256Hash: hash,
},
};
const extensions2 = {
persistedQuery: {
version: VERSION,
sha256Hash: sha256
.create()
.update(query2)
const hash = sha256
.create()
.update(query)
.hex();
const extensions = {
persistedQuery: {
version: VERSION,
sha256Hash: hash,
},
};
const extensions2 = {
persistedQuery: {
version: VERSION,
sha256Hash: sha256
.create()
.update(query2)
.hex(),
},
};
beforeEach(async () => {
const map = new Map();
const cache = {
set: async (key, val) => {
await map.set(key, val);
},
get: async key => map.get(key),
};
app = await createApp({
graphqlOptions: {
describe('Persisted Queries', () => {
let uri: string;
const query = gql`
${TEST_STRING_QUERY}
`;
const hash = sha256
.create()
.update(TEST_STRING_QUERY)
.hex();
const extensions = {
persistedQuery: {
version: VERSION,
sha256Hash: hash,
},
};
beforeEach(async () => {
const serverInfo = await createApolloServer({
schema,
introspection: false,
persistedQueries: {
cache: new Map() as any,