Untitled

mail@pastecode.io avatar
unknown
typescript
2 years ago
1.0 kB
2
Indexable
Never
const options = {
        url: GRAPHQL_ENDPOINT,
        method: 'post',
        headers: {
            'x-api-key': GRAPHQL_API_KEY,
            'Content-Type': 'application/json',
        },
        data: {
            query: `
                query {
                    getProtocol(id: "5086a684-ac46-4abb-883e-77c87d14cf01") {
                        id
                        factoryNumber
                        description
                        createdAt
                        supplier
                        type
                        yearOfConstruction
                        yearOfOperation
                        checkResult {
                            items {
                                id
                                label
                                name
                                result
                            }
                        }
                    }
                }
            `
        }
    }

    const response = await axios(options);