diff --git a/app/src/main/java/org/dnss/sfs/git/wdg/noise/Apollo.kt b/app/src/main/java/org/dnss/sfs/git/wdg/noise/Apollo.kt index f141335..5b7b7e0 100644 --- a/app/src/main/java/org/dnss/sfs/git/wdg/noise/Apollo.kt +++ b/app/src/main/java/org/dnss/sfs/git/wdg/noise/Apollo.kt @@ -1,10 +1,6 @@ package org.dnss.sfs.git.wdg.noise import com.apollographql.apollo3.ApolloClient -class Apollo { - val apolloClient = ApolloClient.Builder() .serverUrl("https://noise.sfs.ddnss.org/graphql") .build() - -} \ No newline at end of file diff --git a/app/src/main/java/org/dnss/sfs/git/wdg/noise/ui/gallery/GalleryFragment.kt b/app/src/main/java/org/dnss/sfs/git/wdg/noise/ui/gallery/GalleryFragment.kt index 6655e62..b497016 100644 --- a/app/src/main/java/org/dnss/sfs/git/wdg/noise/ui/gallery/GalleryFragment.kt +++ b/app/src/main/java/org/dnss/sfs/git/wdg/noise/ui/gallery/GalleryFragment.kt @@ -8,7 +8,8 @@ import android.view.ViewGroup import androidx.fragment.app.Fragment import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.lifecycleScope -import org.dnss.sfs.git.wdg.noise.Apollo +import org.ddnss.sfs.git.wdg.noise.GetUsersQuery +import org.dnss.sfs.git.wdg.noise.apolloClient import org.dnss.sfs.git.wdg.noise.databinding.FragmentGalleryBinding class GalleryFragment : Fragment() { @@ -38,9 +39,9 @@ class GalleryFragment : Fragment() { super.onViewCreated(view, savedInstanceState) lifecycleScope.launchWhenResumed { - val response = Apollo.apolloClient.query(getUsers()).execute() + val response = apolloClient.query(GetUsersQuery()).execute() + - Log.d("getUsers", "Data:: ${response.data}") } }