Adding saweb-api module.
This commit is contained in:
1 parent
42857554b7
commit
263a3fceba
5 files changed
+158
-10
No files matched your search
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user