liqlAdmin in khoros aurora graphql API
Hi Folks, I want to add roles to the users using graphQL API given below. const ADD_USER_ROLE_MUTATION = gql` mutation addUsersToRole($roleKey: RoleKeyInput!, $users: [UserIdInput!]!) { addUsersToRole(roleKey: $roleKey, users: $users) { result { id name } } } `; const [addUserRole] = useMutation(ADD_USER_ROLE_MUTATION); addUserRole({ variables: { roleKey: { roleName: "role" }, users: [{ id: userId }] } }); The issue I am facing is that when this mutation is executed by an Admin user, the role is successfully added to the target user. However, when the same mutation is executed by a normal user, it fails to add the role due to permission denied errors. Is there a parameter or keyword that can be used in this mutation to allow a normal user to update their own roles or self-related data? For example, in Khoros Classic, we can use the liqlAdmin keyword in REST API requests to bypass such permissions. Is there an equivalent for GraphQL in Khoros Aurora? Thanks in Advance.Solved500Views0likes12CommentsHandlebars custom component not executing GraphQL query
I have been following along with the directions on this page to try to create a custom Handlebars component that executes a graphQL query and displays the results in simple HTML. My .hbs file references the query like this: {{#gql "privateUserStats" variables=(hash id=user.id)}} ... {{/gql}} I also have a .graphql query defined in queries/privateUserStats.query.graphql: query privateUserStats($id: ID!) { user(id: $id) { id login email firstName lastName email ... } topicsStarted: messages(constraints: {authorId: {eq: $id}, depth: {eq: 0}}) { totalCount }... } and I reference it in my component.json under the "graphql" block: "graphql": { "privateUserStats": "./queries/privateUserStats.query.graphql" } Despite this setup: The Handlebars rendered correctly user.id was available But the GraphQL query never fired — no network activity, no data returned, and no console errors Can someone help? I'm all out of ideas.300Views0likes6CommentsUsing LiQL or SQL on Aurora instead of GraphQL?
We had an LiQL query we were using for years to surface community posts on our help center, and following the move to Aurora we need to update this to GraphQL. However, the developers on that team would prefer SQL/LiQL as their system is not set up for GraphQL. Is it possible to still use LiQL or SQL queries while on Aurora?299Views1like10CommentsDashboard Data Not Matching Reports — Need Help
Hi everyone, I’m trying to pull dashboard data, pageViews, visits, uniqueVisitors, etc. but the numbers I’m getting aren’t matching. I’m really new to this and trying to get the data for reporting, and I’ve been stuck for a few months. I tried the Bulk API, but the numbers came out really low. So I decided to download the report from Analytics instead. Dashboard Report Can anyone explain why the dashboard numbers don’t match the report? Is anyone using a different method to get this data? I’m trying to bring everything into Power BI. Can I get this data using Aurora GraphQL API? Thanks!201Views0likes2CommentsAurora Email Templates
Hi everyone, I am new to GraphQL, so please forgive any silly questions here. I've successfully set myself up in Postman, and can retrieve email templates. I understand the documentation here about the process of updating a template, but I am hung up on viewing the HTML within each template so that I might edit that. My end goal, hopefully, is to be able to glean the variable for a post title within say, the Mentions template, and put that into the Subject of the email. So instead of "{User} mentioned you on {Community Title}" I would ideally have a subject that says "{User} mentioned you in the thread {Post Title}" I would also like to edit other pieces of other emails, but looking to cut my teeth on this one. Has anyone had success making a change like this on Aurora, and might be able to point me in the right direction? Thank you!200Views2likes5CommentsIncremental data for attachments in messages and replies
I am trying to get incremental data based on required datetime field for attachments related data in messages and replies. Can someone please help me with this ? Graphql queries for which I need incremental data is as follows: query Attachments { messages { edges { node { id attachments { edges { node { id filename url } } } } } } } Thanks200Views1like5CommentsError message when adding a query to handlebars component (Aurora)
I'm trying to follow the documentation on creating a custom handlebars component in Aurora and I'm running into a weird error that I can't figure out. I have added the component via a GraphQL mutation and it works fine with some basic HTML, but once I try to follow this doc: https://developer.khoros.com/khorosauroradevdocs/docs/adding-graphql-queries-and-fragments-to-a-custom-handlebars-component I'm running into some issues: There's no docs (at least not that I've found) that explain how to get the bearer token or where the file should be stored or how that works when using GraphQL to upload a GraphQL file to use in a component (see here: https://developer.khoros.com/khorosauroradevdocs/docs/adding-graphql-queries-and-fragments-to-a-custom-handlebars-component#uploading-a-graphql-file-for-a-component-via-graphql) and I've been unable to figure out how to do this on my own. I've tried a few things with no success. If I try to follow the steps to add it manually, then I run into some strange errors. I'm running the SDK via VS code terminal which is working fine, but as soon as I follow the steps to add a "queries" folder and .graphql file to that folder within my component folder (e.g., components/myComponent/queries/myComponent.query.graphql) then I get an error in the VS Code terminal that says ""message": "The Content-Type header included with the request is not allowed (it should be either application/json or application/xml)."," and in my browser console when I try to load my custom component is: "Unable to fetch component to render for component id custom.widget.releaseTkbSidebar: Exception while fetching data (/component/render) : com.github.jknack.handlebars.HandlebarsException: releaseTkbSidebar:1:18: lithium.coreapi.components.ComponentTemplateApplyException: unable to apply template: releaseTkbSidebar: no query found matching the name 'releaseTkbSidebarQuery'. releaseTkbSidebar:1:18" Anyone know what's going on here? I've follow the dev docs and examples exactly (or as close as I can given that they've proven to be very inaccurate) and I'm out of things to test through trial and error. Here's what I have in my .hbs file for my custom component: <h2>Test!</h2> {{#gql "releaseTkbSidebarQuery"}} {{#with data.messages.edges as |edges|}} {{#each edges}} {{#with node as |message|}} <p>{{message.subject}}</p> {{/with}} {{/each}} {{/with}} {{/gql}} And here's what my .graphql query file looks like query releaseTkbSidebarQuery { messages { edges { node { id customFields subject } } } } My file structure looks like this Any help would be very much appreciated!139Views0likes5CommentsLiQL to GraphQL example sets?
is there an example set of LiQL -> graphQL query conversions anywhere? For example, I use this LiQL query to pull the latest articles in my tkb: query = f"SELECT subject, view_href, body, labels FROM messages WHERE board.id = '{tkb}' ORDER BY manual_sort, post_time desc limit 4" response = k.query(query)102Views0likes1CommentHTML support for GraphQL API
Hi Khoros, I've been roadmapping usage for the GraphQL API that allows for the creation of a Knowledge Base Article: https://developer.khoros.com/khorosauroradevdocs/docs/create-a-knowledge-base-article#create-a-knowledge-base-article When it comes to populating the GraphQL, I noticed some fields that we can use to populate an article, like "subject", "body", "introduction". However, when it comes to creating a Knowledge Base Article, I'm curious if there is support for some things I can do with the GraphQL API that we can already do with the UI version of creating a Knowledge Base Article. For example, in the UI, I can open the Source Code field in the editor of the article (please see attached screenshot). What this allows me to do is to essentially author the article in HTML, rather than in plaintext. So, as seen in the screenshot, I can set the Source Code for the new Knowledge Base Article. My question is this: with the GraphQL API, can I submit the body content as straight HTML just like I can in the UI > SourceCode? If the answer is no, my question we then be, is there a way we can set the HTML of a new Knowledge Base Article using the GraphQL API in any way (Source Code or otherwise)? Thanks, Edson99Views1like1Comment