GraphQL client

73 views
Skip to first unread message

Richard Dijkstra

unread,
Aug 5, 2020, 3:39:49 PM8/5/20
to TopBraid Suite Users
Good evening,

We are planning app development with EDG as it's backend.
Using simple POST request without a graphql client works fine.


But we have tried both Apollo and Urql with React. In both cases we get CORS errors.
Reason: CORS header 'Access-Control-Allow-Origin' missing

Before we wasted more time on an unsupported feature: Is this architecture (using a GraphQL client) supported by the external EDG GraphQL API?

Kind regards,
Richard

Pat Doyle

unread,
Aug 5, 2020, 3:51:02 PM8/5/20
to topbrai...@googlegroups.com
Richard,

We have used both(first Apollo, now urql) internally to build react components using our endpoint, so yes, it should be supported. 

Hope it helps,
Pat

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/3adc51f9-1b9b-4181-b4bf-62c75b48c877o%40googlegroups.com.

Richard Dijkstra

unread,
Aug 5, 2020, 3:59:08 PM8/5/20
to TopBraid Suite Users
Hi Pat,

Thank you for this possitive answer. We will continue to build this great App with EDG as the backend.

KInd regards,
Richard


On Wednesday, August 5, 2020 at 9:51:02 PM UTC+2, Pat Doyle wrote:
Richard,

We have used both(first Apollo, now urql) internally to build react components using our endpoint, so yes, it should be supported. 

Hope it helps,
Pat
On Wed, Aug 5, 2020 at 3:39 PM Richard Dijkstra <richarddi...@gmail.com> wrote:
Good evening,

We are planning app development with EDG as it's backend.
Using simple POST request without a graphql client works fine.


But we have tried both Apollo and Urql with React. In both cases we get CORS errors.
Reason: CORS header 'Access-Control-Allow-Origin' missing

Before we wasted more time on an unsupported feature: Is this architecture (using a GraphQL client) supported by the external EDG GraphQL API?

Kind regards,
Richard

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.

Simon Opper

unread,
Aug 5, 2020, 6:38:41 PM8/5/20
to topbrai...@googlegroups.com
Hi Richard and Pat

Weve just built an extensive graphql API for the EDG backend including with integration to other Google cloud nlp machine services using python and it's graphene library.

Cors was accommodated easily.

Worth consideration.

Cheers

Simon

To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/011c6fa2-3807-4be6-b558-599cb7a75940o%40googlegroups.com.

Richard Dijkstra

unread,
Aug 6, 2020, 3:01:55 AM8/6/20
to TopBraid Suite Users
Hi Simon,

Thank you for the addition on architectural choices. Python is indeed more easy to start with, I have already access to EDG  through Python using gql with a full stack framework.
However, it feels for us approperiate to do prototyping in Python and lagging app building using React. These are difficult and important choices.

Kind regards,
Richard
.

Richard Dijkstra

unread,
Aug 8, 2020, 4:57:22 AM8/8/20
to TopBraid Suite Users
Dear Simon,

Do you have experience with Python RDFLib SPARQLWrapper?
I try to query the EDG sparql endpoint but too many combinations need to be tested resolving an 406 error. 'Sparql-client' works fine but that library has limited sparql capabilities.
If you so, do you have a working example?

Kind regards,
Richard

On Thursday, August 6, 2020 at 12:38:41 AM UTC+2, Simon Opper wrote:

Richard Dijkstra

unread,
Aug 12, 2020, 5:51:28 AM8/12/20
to TopBraid Suite Users
Hi Simon and others,

I have SPARQLWrapper running creating perfect ttl's to be used in other apps guarantying semantic interoperability.

Kind regards, Richard

richarddi...@gmail.com

unread,
Aug 22, 2020, 5:54:23 AM8/22/20
to TopBraid Suite Users
Dear all,

Simon refers to the Python RDF/Graphql ecosystem . Using JS/Meteor/urql/React for the graph ql endpoint access still gives me CORS messages. I know we have to apply CORS. Knowing CORS has a server and a client side we can only influence the client side. The server side EDG/Tomcat and TB Composer ME are given; what are the design choises for the EDG servers according to CORS?

btw I found https://enable-cors.org/server_tomcat.html , is this applicable to EDG

Kinde regards,
Richard.

richarddi...@gmail.com

unread,
Aug 24, 2020, 7:08:18 AM8/24/20
to TopBraid Suite Users
Dear Simon,

Sparql queries and updates are in place now for us. Graph queries work fine but mutations are missing, I get the following error
<class 'gql.transport.exceptions.TransportQueryError'> {'message': 'Schema is not configured for mutations.', 'locations': [{'line': 1, 'column': 1}]} .

Do you have an example of a working mutation from Graphene in EDG? I use the following not-working query to create a triple:

    transport_data = RequestsHTTPTransport(
        url="http://localhost:8083/tbl/graphql/testdata")
    client_data = Client(transport=transport_data, fetch_schema_from_transport=True)
    
    query_data= gql("""
        mutation {
        createtestClass (input: {uri: "testdata:indpy2" })
        }
    """)

   result_data = client_data.execute(query_data)

Regards,
Richard


On Thursday, August 6, 2020 at 12:38:41 AM UTC+2 simon...@surroundaustralia.com wrote:
Reply all
Reply to author
Forward
0 new messages