V2 API CORs error

I think I’m getting the same CORs error I’ve seen a few people post below.

This is what I have:

const client = new ApolloClient({
uri: ‘https://openstates.org/graphql’,
request: operation => {
operation.setContext({
headers: {
‘X-API-KEY’: ‘mykey’
}
})
}
})

Is there a fix for this yet?

I haven’t yet been able to reproduce the error-- can you possibly post a complete code sample as a gist or similar that replicates the behavior?

This topic was automatically closed 70 days after the last reply. New replies are no longer allowed.