Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
GraphQLString,
GraphQLNonNull
} from '@gapi/core';
import { ClientType } from './types/client.type';
import { Config, ConfigViews } from '../app.tokens';
import {
mapComponentsPath,
modifyViewsConfig
} from '../../helpers/component.parser';
export const viewsToArray = (a: { [key: string]: T }): Array =>
Object.keys(a).reduce(
(acc, curr) => [...acc, { ...a[curr], name: curr }],
[]
);
@Controller({
guards: [],
type: []
})
export class ClientController {
constructor(private pubsub: PubSubService) {}
@Type(ClientType)
@Subscribe(
withFilter(
function(self: ClientController) {
return self.pubsub.asyncIterator('listenForChanges');
},
function(global, unused, payload, context) {
const isCorrectLength = context.clientid.length + context.clientid.length;
if (isCorrectLength === 100 && payload.clientId === context.clientid) {
return true;