INNER CODE UNIT · TypeScript

fetch

SaltyAom/mobius · src/index.ts:881

    protected get fetch() {
        return (
            this.config?.fetch ??
            ((query: string) =>
                fetch(this.config?.url ?? '', {
                    method: 'POST',
                    headers: {
                        'Content-Type': 'application/json'
                    },
                    body: JSON.stringify({
                        query,
                        variables: {}
                    })
                }).then((x) =>
                    x.json().then((x) => (x as { data: unknown }).data)
                ))
        )
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…