Adding saweb-api module.

This commit is contained in:
Matias committed 2019-05-29 10:46:30 -03:00
1 parent 42857554b7
commit 263a3fceba
5 files changed
+158 -10

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import { client } from '../graphql/apollo'
import { ECOSYSTEM_QUERY } from '../graphql/EcosystemQuery'
import Log from './log'
export async function setInitialEcosystem() {
try {
const ecosystem = await client.query({ query: ECOSYSTEM_QUERY })
window.localStorage.setItem('ecosystem', JSON.stringify(ecosystem.data.web_GetEcosystem))
} catch (error) {
Log.error('Error getting the ecosystem: ' + error)
}
}