Issue #1002💬 AnsweredOpened April 4, 2018by tejaravi1 reactions

Please help me in integrating grapesjs with graphQL

快速解答by artf1

Try to implement a custom Storage Manager https://github.com/artf/grapesjs/wiki/API-Storage-Manager#add

Read full answer below ↓

Question

代码片段TEXT
Hi Guys,

Can you help me out on how to query urlStore, urlLoad instead of using rest api call, we need to use graphQL.
In GraphQL we will have only one global end point URL, but to save/retrieve the data we need to use the graphQuery Language, like:
 (here we are using Angular integrated with apollo to work with graphQL) onInit we are querying and subscribing to the response.
ngOnInit() {
    this.apollo.watchQuery({
      query: gql `
  query getGrapesContent {
  getGrapes(id:"Z3JhcGVzOjE=") {
    Name
    Html
    Css
  }
}
`;
    }).valueChanges.subscribe((response) => {
      // 5
      this.Html = response.data.Html;
      this.Css = response.data.Css;
     });

  }
}

Can you help us how can we use this logic with grapesJs.

Answers (2)

lock[bot]September 17, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.