swift-graphql icon indicating copy to clipboard operation
swift-graphql copied to clipboard

Linux support

Open fwcd opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. It would be nice to have the library available on Linux too, e.g. to use the GraphQL client in server-sided applications.

Describe the solution you'd like Add support for Linux by...

fwcd avatar Feb 17 '21 16:02 fwcd

We could make the Selection.serialize function public so people can use SwiftGraphQL on their own network layer.

Amzd avatar Feb 23 '21 00:02 Amzd

@fwcd would that make integrating the library with apple code more complicated (i.e. would it require additional steps to include custom frameworks as compared to now)?

maticzav avatar Feb 23 '21 12:02 maticzav

I've actually been looking into platform support this past week. I recognise this is an old issue, but I also think we might have some options that would enable this.

To address @maticzav's concern, I agree we don't want to do that. But I think there could be options depending on how we structure packages.

I don't know the internals well enough yet, but as a broad idea, I believe we could include platform-agnostic code in a Core library. Then have the  platforms code in a library similar to what we have now, but automatically depending on the new core.

Linux libraries could then be added that build on core.

I also like this idea even for  platforms. I'd prefer to have "convenience" but still have options for injecting my own network stack since when integrating with an existing app for example, it would be common to already have a lot established networking layer, caching, logging, etc... that would be thus easier to integrate with.

I'd like to close this issue for now. But I'll start a new discussion so we can continue to discuss requirements and options there. This would likely be planned for v6 anyway, so a larger discussion makes more sense imo 👍

shaps80 avatar Oct 19 '23 17:10 shaps80