Conversation
djhi
reviewed
Sep 5, 2025
| import { withSupabaseFilterAdapter } from './internal/supabaseAdapter'; | ||
|
|
||
| const baseDataProvider = simpleRestProvider('http://localhost:4000'); | ||
| const baseDataProvider = simpleRestProvider('https://localhost:4000'); |
Contributor
There was a problem hiding this comment.
As this is never accessed anyway, why not even put something that looks like a real api?
Suggested change
| const baseDataProvider = simpleRestProvider('https://localhost:4000'); | |
| const baseDataProvider = simpleRestProvider('https://crm.api.marmelab.com'); |
Contributor
Author
There was a problem hiding this comment.
I thought about it but wasn't sure that it was a good idea, but let's try it!
| const dataProvider = buildApolloClient({ | ||
| clientOptions: { | ||
| uri: 'http://localhost:4000/graphql', | ||
| uri: 'https://localhost:4000/graphql', |
Contributor
There was a problem hiding this comment.
Same for those?
Suggested change
| uri: 'https://localhost:4000/graphql', | |
| uri: 'https://ecommerce.api.marmelab.com/graphql', |
| import simpleRestProvider from 'ra-data-simple-rest'; | ||
|
|
||
| export default simpleRestProvider('http://localhost:4000'); | ||
| export default simpleRestProvider('https://localhost:4000'); |
Contributor
There was a problem hiding this comment.
Suggested change
| export default simpleRestProvider('https://localhost:4000'); | |
| export default simpleRestProvider('https://ecommerce.api.marmelab.com/graphql'); |
| const data = generateData(); | ||
| const adapter = new MswAdapter({ | ||
| baseUrl: 'http://localhost:4000', | ||
| baseUrl: 'https://localhost:4000', |
Contributor
There was a problem hiding this comment.
Suggested change
| baseUrl: 'https://localhost:4000', | |
| baseUrl: 'https://ecommerce.api.marmelab.com/graphql', |
| } | ||
| const worker = setupWorker(http.all(/http:\/\/localhost:4000/, fakeServer)); | ||
| const worker = setupWorker( | ||
| http.all(/https:\/\/localhost:4000/, fakeServer) |
Contributor
There was a problem hiding this comment.
Suggested change
| http.all(/https:\/\/localhost:4000/, fakeServer) | |
| http.all(/https:\/\/ecommerce\.api\.marmelab\.com:4000/, fakeServer) |
|
|
||
| const handler = getMswHandler({ | ||
| baseUrl: 'http://localhost:4000', | ||
| baseUrl: 'https://localhost:4000', |
Contributor
There was a problem hiding this comment.
Suggested change
| baseUrl: 'https://localhost:4000', | |
| baseUrl: 'https://crm.api.marmelab.com', |
| }); | ||
| export const worker = setupWorker(http.all(/http:\/\/localhost:4000/, handler)); | ||
| export const worker = setupWorker( | ||
| http.all(/https:\/\/localhost:4000/, handler) |
Contributor
There was a problem hiding this comment.
Suggested change
| http.all(/https:\/\/localhost:4000/, handler) | |
| http.all(/https:\/\/crm\.api\.marmelab\.com:4000/, handler) |
djhi
approved these changes
Sep 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Demo / CRM examples are not working in production when using Safari.
Solution
Use https://crm.api.marmelab.com / https://demo.api.marmelab.com instead of http://localhost:4000 for the fake server handled by MSW.
How To Test
Visit https://marmelab.com/react-admin-crm and https://marmelab.com/react-admin-demo with Safari.
Additional Checks
masterfor a bugfix or a documentation fix, ornextfor a feature[ ] The PR includes unit tests (if not possible, describe why)[ ] The PR includes one or several stories (if not possible, describe why)