I have an issue with federated types #997
Replies: 4 comments 5 replies
-
Please show minimal reproduction for the problem or describe how to reproduce it. |
Beta Was this translation helpful? Give feedback.
-
I am working on a Timelogs project. The application TIMELOGS is supposed to capture user’s reporting and leaving time. I have two different databases with two different services. The authentication service and the time service. They have different graphql schemas too and are federeated. The reference resolver is been written for the authentication service but when a query is written, the times service is unable to pull the information from the authentication database. Authentication service Time service type Log @key(fields:"id") { @user.reference_resolver |
Beta Was this translation helpful? Give feedback.
-
The problem you are describing, that Service A has no access to data in Service B and viceversa, is not an issue in Ariadne or even in Federation. Data access and combination is done in federation, and services don't have access to each other data unless you explicitly implement that access into services. Time service will not know about the authentication service by default. They will only know about user ID. If you want to know more, your time service should use this ID to request data from authentication service directly, either by doing GraphQL query to it, or asking it's REST API or by other method. What Federation does when it finds that Keeping above in mind, Time service should know atleast about user's ID in Authentication service, and |
Beta Was this translation helpful? Give feedback.
-
I have done a similar solution you've presented but still does not generate
the data.
Is there a way to connect with you to have a look at my code? Video
conference or share my code with you on github.
…On Fri, Dec 16, 2022 at 6:55 PM Rafał Pitoń ***@***.***> wrote:
The problem you are describing, that Service A has no access to data in
Service B and viceversa, is not an issue in Ariadne or even in Federation.
Data access and combination is done in federation, and services don't have
access to each other data *unless you explicitly implement that access
into services*. Time service will not know about the authentication
service by default. They will only know about user ID. If you want to know
more, your time service should use this ID to request data from
authentication service directly, either by doing GraphQL query to it, or
asking it's REST API or by other method.
—
Reply to this email directly, view it on GitHub
<#997 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3635LX64FLHM7YG7235FTDWNS3JNANCNFSM6AAAAAATBLYMMM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Federated fields are not communicating . Any help?
Beta Was this translation helpful? Give feedback.
All reactions